Apache Lucene open-source search software
SOLR-10792: Deprecate and remove implicit registration of lucenePlusSort aka OldLuceneQParser
Chris Hostetterc88c524bbf22
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex 6d0e6c7d9d0..4159318dbe4 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 ==================diff --git a/solr/core/src/java/org/apache/solr/search/LuceneQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/LuceneQParserPlugin.javaindex 4e2a4d6cc13..86683305aae 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 {}}-+@Deprecatedclass OldLuceneQParser extends LuceneQParser {String sortStr;diff --git a/solr/core/src/java/org/apache/solr/search/OldLuceneQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/OldLuceneQParserPlugin.javaindex d2b583c62af..d4cbfcbd857 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*/+@Deprecatedpublic class OldLuceneQParserPlugin extends QParserPlugin {public static final String NAME = "lucenePlusSort";diff --git a/solr/core/src/java/org/apache/solr/search/QParserPlugin.java b/solr/core/src/java/org/apache/solr/search/QParserPlugin.javaindex d8dc29f0722..2ee63cf65ea 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, SolrIstatic {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);diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig.xmlindex a63f6cb1751..27f2e42500e 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>diff --git a/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java b/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.javaindex 1ec4198674e..0a9059c9488 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");}+ @Deprecatedpublic void testQueryLucenePlusSort() throws Exception {assertQueryEquals("lucenePlusSort","apache solr", "apache solr", "apache solr ; score desc");diff --git a/solr/solr-ref-guide/src/other-parsers.adoc b/solr/solr-ref-guide/src/other-parsers.adocindex 9b438f5d23d..76607800b10 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 theFor 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