mirror of https://github.com/apache/lucene.git
SOLR-2724 Removed defaultSearchField and defaultOperator from schema.xml as they are deprecated.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1306159 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
461e7884c6
commit
264f63036c
|
@ -503,6 +503,10 @@ Upgrading from Solr 3.5
|
|||
* SOLR-3161: Don't use the 'qt' parameter with a leading '/'. It probably won't work in 4.0
|
||||
and it's now limited in 3.6 to SearchHandler subclasses that aren't lazy-loaded.
|
||||
|
||||
* SOLR-2724: Specifying <defaultSearchField> and <solrQueryParser defaultOperator="..."/> in
|
||||
schema.xml is now considered deprecated. Instead you are encouraged to specify these via the "df"
|
||||
and "q.op" parameters in your request handler definition. (David Smiley)
|
||||
|
||||
New Features
|
||||
----------------------
|
||||
* SOLR-2854: Now load URL content stream data (via stream.url) when called for during request handling,
|
||||
|
|
|
@ -438,7 +438,7 @@ public final class IndexSchema {
|
|||
|
||||
node = (Node) xpath.evaluate("/schema/defaultSearchField/text()", document, XPathConstants.NODE);
|
||||
if (node==null) {
|
||||
log.warn("no default search field specified in schema.");
|
||||
log.debug("no default search field specified in schema.");
|
||||
} else {
|
||||
defaultSearchFieldName=node.getNodeValue().trim();
|
||||
// throw exception if specified, but not found or not indexed
|
||||
|
@ -449,7 +449,7 @@ public final class IndexSchema {
|
|||
throw new SolrException( SolrException.ErrorCode.SERVER_ERROR, msg );
|
||||
}
|
||||
}
|
||||
log.info("default search field is "+defaultSearchFieldName);
|
||||
log.info("default search field in schema is "+defaultSearchFieldName);
|
||||
}
|
||||
|
||||
node = (Node) xpath.evaluate("/schema/solrQueryParser/@defaultOperator", document, XPathConstants.NODE);
|
||||
|
|
|
@ -133,7 +133,7 @@ public class SolrQueryParser extends QueryParser {
|
|||
if (field == null && defaultField == null) {
|
||||
throw new SolrException
|
||||
(SolrException.ErrorCode.BAD_REQUEST,
|
||||
"no field name specified in query and no defaultSearchField defined in schema.xml");
|
||||
"no field name specified in query and no default specified via 'df' param");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -987,12 +987,6 @@
|
|||
-->
|
||||
<uniqueKey>id</uniqueKey>
|
||||
|
||||
<!-- field for the QueryParser to use when an explicit fieldname is absent -->
|
||||
<defaultSearchField>text</defaultSearchField>
|
||||
|
||||
<!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
|
||||
<solrQueryParser defaultOperator="OR"/>
|
||||
|
||||
<!-- copyField commands copy one field to another at the time a document
|
||||
is added to the index. It's used either to index the same field differently,
|
||||
or to add multiple fields to the same field for easier/faster searching. -->
|
||||
|
|
|
@ -734,6 +734,7 @@
|
|||
<lst name="defaults">
|
||||
<str name="echoParams">explicit</str>
|
||||
<int name="rows">10</int>
|
||||
<str name="df">text</str>
|
||||
</lst>
|
||||
<!-- In addition to defaults, "appends" params can be specified
|
||||
to identify values which should be appended to the list of
|
||||
|
|
Loading…
Reference in New Issue