You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ds...@apache.org on 2012/03/28 06:43:56 UTC
svn commit: r1306159 - in /lucene/dev/trunk/solr: CHANGES.txt
core/src/java/org/apache/solr/schema/IndexSchema.java
core/src/java/org/apache/solr/search/SolrQueryParser.java
example/solr/conf/schema.xml example/solr/conf/solrconfig.xml
Author: dsmiley
Date: Wed Mar 28 04:43:55 2012
New Revision: 1306159
URL: http://svn.apache.org/viewvc?rev=1306159&view=rev
Log:
SOLR-2724 Removed defaultSearchField and defaultOperator from schema.xml as they are deprecated.
Modified:
lucene/dev/trunk/solr/CHANGES.txt
lucene/dev/trunk/solr/core/src/java/org/apache/solr/schema/IndexSchema.java
lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/SolrQueryParser.java
lucene/dev/trunk/solr/example/solr/conf/schema.xml
lucene/dev/trunk/solr/example/solr/conf/solrconfig.xml
Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1306159&r1=1306158&r2=1306159&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Wed Mar 28 04:43:55 2012
@@ -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,
Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/schema/IndexSchema.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/schema/IndexSchema.java?rev=1306159&r1=1306158&r2=1306159&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/schema/IndexSchema.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/schema/IndexSchema.java Wed Mar 28 04:43:55 2012
@@ -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);
Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/SolrQueryParser.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/SolrQueryParser.java?rev=1306159&r1=1306158&r2=1306159&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/SolrQueryParser.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/SolrQueryParser.java Wed Mar 28 04:43:55 2012
@@ -133,7 +133,7 @@ public class SolrQueryParser extends Que
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");
}
}
Modified: lucene/dev/trunk/solr/example/solr/conf/schema.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/example/solr/conf/schema.xml?rev=1306159&r1=1306158&r2=1306159&view=diff
==============================================================================
--- lucene/dev/trunk/solr/example/solr/conf/schema.xml (original)
+++ lucene/dev/trunk/solr/example/solr/conf/schema.xml Wed Mar 28 04:43:55 2012
@@ -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. -->
Modified: lucene/dev/trunk/solr/example/solr/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/example/solr/conf/solrconfig.xml?rev=1306159&r1=1306158&r2=1306159&view=diff
==============================================================================
--- lucene/dev/trunk/solr/example/solr/conf/solrconfig.xml (original)
+++ lucene/dev/trunk/solr/example/solr/conf/solrconfig.xml Wed Mar 28 04:43:55 2012
@@ -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