You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by cp...@apache.org on 2017/06/02 10:56:48 UTC

[25/38] lucene-solr:jira/solr-8668: SOLR-10792: Deprecate and remove implicit registration of lucenePlusSort aka OldLuceneQParser

SOLR-10792: Deprecate and remove implicit registration of lucenePlusSort aka OldLuceneQParser


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/c88c524b
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/c88c524b
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/c88c524b

Branch: refs/heads/jira/solr-8668
Commit: c88c524bbf225dcf71a4998373ad88c7ad8efd80
Parents: 57fe80d
Author: Chris Hostetter <ho...@apache.org>
Authored: Thu Jun 1 10:01:17 2017 -0700
Committer: Chris Hostetter <ho...@apache.org>
Committed: Thu Jun 1 10:01:17 2017 -0700

----------------------------------------------------------------------
 solr/CHANGES.txt                                         |  5 +++++
 .../java/org/apache/solr/search/LuceneQParserPlugin.java |  2 +-
 .../org/apache/solr/search/OldLuceneQParserPlugin.java   |  3 +++
 .../src/java/org/apache/solr/search/QParserPlugin.java   |  1 -
 .../src/test-files/solr/collection1/conf/solrconfig.xml  |  3 +++
 .../test/org/apache/solr/search/QueryEqualityTest.java   |  1 +
 solr/solr-ref-guide/src/other-parsers.adoc               | 11 -----------
 7 files changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c88c524b/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 6d0e6c7..4159318 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -82,6 +82,10 @@ Upgrading from Solr 6.x
 * Deprecated LatLonType, GeoHashField, SpatialPointVectorFieldType, and SpatialTermQueryPrefixTreeFieldType.
   Instead, switch to LatLonPointSpatialField or SpatialRecursivePrefixTreeFieldType or RptWithGeometrySpatialField.
 
+* The 'lucenePlusSort' QParser has been deprecated, and is no longer implicitly defined.  If you wish to continue using
+  this QParser untill Solr 8, you must explicitly register it in your solrconfig.xml:
+     '<queryParser name="lucenePlusSort" class="solr.OldLuceneQParserPlugin"/>'
+
 New Features
 ----------------------
 * SOLR-9857, SOLR-9858: Collect aggregated metrics from nodes and shard leaders in overseer. (ab)
@@ -207,6 +211,7 @@ Other Changes
 
 * SOLR-10744: Update noggit to newer version (0.8) (noble)
 
+* SOLR-10792: Deprecate and remove implicit registration of "lucenePlusSort" aka OldLuceneQParser (hossman)
 
 ==================  6.7.0 ==================
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c88c524b/solr/core/src/java/org/apache/solr/search/LuceneQParserPlugin.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/LuceneQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/LuceneQParserPlugin.java
index 4e2a4d6..8668330 100644
--- a/solr/core/src/java/org/apache/solr/search/LuceneQParserPlugin.java
+++ b/solr/core/src/java/org/apache/solr/search/LuceneQParserPlugin.java
@@ -42,7 +42,7 @@ public class LuceneQParserPlugin extends QParserPlugin {
   }
 }
 
-
+@Deprecated 
 class OldLuceneQParser extends LuceneQParser {
   String sortStr;
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c88c524b/solr/core/src/java/org/apache/solr/search/OldLuceneQParserPlugin.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/OldLuceneQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/OldLuceneQParserPlugin.java
index d2b583c..d4cbfcb 100644
--- a/solr/core/src/java/org/apache/solr/search/OldLuceneQParserPlugin.java
+++ b/solr/core/src/java/org/apache/solr/search/OldLuceneQParserPlugin.java
@@ -23,7 +23,10 @@ import org.apache.solr.request.SolrQueryRequest;
  * Parse Solr's variant of Lucene QueryParser syntax, including the
  * deprecated sort specification after the query.
  * <br>Example: <code>{!lucenePlusSort}myfield:foo +bar -baz;price asc</code>
+ *
+ * @deprecated This class should have been removed a long time ago, it will be removed in Solr 8.0
  */
+@Deprecated
 public class OldLuceneQParserPlugin extends QParserPlugin {
   public static final String NAME = "lucenePlusSort";
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c88c524b/solr/core/src/java/org/apache/solr/search/QParserPlugin.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/QParserPlugin.java b/solr/core/src/java/org/apache/solr/search/QParserPlugin.java
index d8dc29f..2ee63cf 100644
--- a/solr/core/src/java/org/apache/solr/search/QParserPlugin.java
+++ b/solr/core/src/java/org/apache/solr/search/QParserPlugin.java
@@ -47,7 +47,6 @@ public abstract class QParserPlugin implements NamedListInitializedPlugin, SolrI
   static {
     HashMap<String, Class<? extends QParserPlugin>> map = new HashMap<>(30, 1);
     map.put(LuceneQParserPlugin.NAME, LuceneQParserPlugin.class);
-    map.put(OldLuceneQParserPlugin.NAME, OldLuceneQParserPlugin.class);
     map.put(FunctionQParserPlugin.NAME, FunctionQParserPlugin.class);
     map.put(PrefixQParserPlugin.NAME, PrefixQParserPlugin.class);
     map.put(BoostQParserPlugin.NAME, BoostQParserPlugin.class);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c88c524b/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml
----------------------------------------------------------------------
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml
index a63f6cb..27f2e42 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml
@@ -494,6 +494,9 @@
 
   <queryParser name="foo" class="FooQParserPlugin"/>
 
+  <!-- deprecated parser, delete once class is deleted in Solr 8.0 -->
+  <queryParser name="lucenePlusSort" class="solr.OldLuceneQParserPlugin"/>
+  
   <updateRequestProcessorChain name="dedupe">
     <processor class="org.apache.solr.update.processor.SignatureUpdateProcessorFactory">
       <bool name="enabled">false</bool>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c88c524b/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java b/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java
index 1ec4198..0a9059c 100644
--- a/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java
+++ b/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java
@@ -94,6 +94,7 @@ public class QueryEqualityTest extends SolrTestCaseJ4 {
                       " +apache +solr");
   }
 
+  @Deprecated
   public void testQueryLucenePlusSort() throws Exception {
     assertQueryEquals("lucenePlusSort", 
                       "apache solr", "apache  solr", "apache solr ; score desc");

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c88c524b/solr/solr-ref-guide/src/other-parsers.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/other-parsers.adoc b/solr/solr-ref-guide/src/other-parsers.adoc
index 9b438f5..7660780 100644
--- a/solr/solr-ref-guide/src/other-parsers.adoc
+++ b/solr/solr-ref-guide/src/other-parsers.adoc
@@ -645,17 +645,6 @@ If the `q1` parameter is price, then the query would be a function query on the
 
 For more information about the possibilities of nested queries, see Yonik Seeley's blog post https://lucidworks.com/2009/03/31/nested-queries-in-solr/[Nested Queries in Solr].
 
-[[OtherParsers-OldLuceneQueryParser]]
-== Old Lucene Query Parser
-
-`OldLuceneQParser` extends the `QParserPlugin` by parsing Solr's variant of Lucene's QueryParser syntax, including the deprecated sort specification after the query.
-
-Example:
-
-[source,text]
-----
-{!lucenePlusSort} myfield:foo +bar -baz;price asc
-----
 
 [[OtherParsers-PayloadQueryParsers]]
 == Payload Query Parsers