diff --git a/src/java/org/apache/solr/handler/FieldAnalysisRequestHandler.java b/src/java/org/apache/solr/handler/FieldAnalysisRequestHandler.java
index a5e31b14a96..8a1997faf70 100644
--- a/src/java/org/apache/solr/handler/FieldAnalysisRequestHandler.java
+++ b/src/java/org/apache/solr/handler/FieldAnalysisRequestHandler.java
@@ -143,7 +143,7 @@ public class FieldAnalysisRequestHandler extends AnalysisRequestHandlerBase {
useDefaultSearchField = false;
}
if (useDefaultSearchField) {
- analysisRequest.addFieldName(req.getSchema().getSolrQueryParser(null).getField());
+ analysisRequest.addFieldName(req.getSchema().getDefaultSearchFieldName());
}
analysisRequest.setQuery(solrParams.get(AnalysisParams.QUERY, solrParams.get(CommonParams.Q)));
analysisRequest.setFieldValue(solrParams.get(AnalysisParams.FIELD_VALUE));
diff --git a/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java b/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java
index 6fdd2baf0a2..4102fccd243 100644
--- a/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java
+++ b/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java
@@ -371,7 +371,7 @@ public class LukeRequestHandler extends RequestHandlerBase
finfo.add("fields", fields);
finfo.add("dynamicFields", dynamicFields);
finfo.add("uniqueKeyField", uniqueField.getName());
- finfo.add("defaultSearchField", schema.getSolrQueryParser(null).getField());
+ finfo.add("defaultSearchField", schema.getDefaultSearchFieldName());
finfo.add("types", types);
return finfo;
}
diff --git a/src/java/org/apache/solr/highlight/SolrHighlighter.java b/src/java/org/apache/solr/highlight/SolrHighlighter.java
index 4235360c6af..f4fdf65aa08 100644
--- a/src/java/org/apache/solr/highlight/SolrHighlighter.java
+++ b/src/java/org/apache/solr/highlight/SolrHighlighter.java
@@ -73,7 +73,7 @@ public abstract class SolrHighlighter
if(emptyArray(fields)) {
// use default search field if highlight fieldlist not specified.
if (emptyArray(defaultFields)) {
- String defaultSearchField = request.getSchema().getSolrQueryParser(null).getField();
+ String defaultSearchField = request.getSchema().getDefaultSearchFieldName();
fields = null == defaultSearchField ? new String[]{} : new String[]{defaultSearchField};
}
else {
diff --git a/src/java/org/apache/solr/schema/IndexSchema.java b/src/java/org/apache/solr/schema/IndexSchema.java
index 13a6a5a9054..7b076dde173 100644
--- a/src/java/org/apache/solr/schema/IndexSchema.java
+++ b/src/java/org/apache/solr/schema/IndexSchema.java
@@ -251,6 +251,7 @@ public final class IndexSchema {
* <solrQueryParser> configuration for this IndexSchema.
*
* @param defaultField if non-null overrides the schema default
+ * @deprecated
*/
public SolrQueryParser getSolrQueryParser(String defaultField) {
SolrQueryParser qp = new SolrQueryParser(this,defaultField);
@@ -262,9 +263,7 @@ public final class IndexSchema {
/**
* Name of the default search field specified in the schema file
- * @deprecated use getSolrQueryParser().getField()
*/
- @Deprecated
public String getDefaultSearchFieldName() {
return defaultSearchFieldName;
}
diff --git a/src/java/org/apache/solr/search/DisMaxQParser.java b/src/java/org/apache/solr/search/DisMaxQParser.java
index 67fa3b2533c..79b2516deb5 100644
--- a/src/java/org/apache/solr/search/DisMaxQParser.java
+++ b/src/java/org/apache/solr/search/DisMaxQParser.java
@@ -207,7 +207,7 @@ public class DisMaxQParser extends QParser {
protected SolrPluginUtils.DisjunctionMaxQueryParser getParser(Map