diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index b7d437b1c28..bec534244ea 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -131,6 +131,8 @@ Other Changes
* LUCENE-9531: Consolidated CharStream and FastCharStream classes: these have been moved from each query parser
package to org.apache.lucene.queryparser.charstream (Dawid Weiss).
+* SOLR-9607: Remove /terms configuration from solrconfig.xml, as implicit definition is up-to-par now (Alexandre Rafalovitch)
+
Bug Fixes
---------------------
* SOLR-14546: Fix for a relatively hard to hit issue in OverseerTaskProcessor that could lead to out of order execution
diff --git a/solr/core/src/resources/ImplicitPlugins.json b/solr/core/src/resources/ImplicitPlugins.json
index 0cfc0096f6f..3e9d439f925 100644
--- a/solr/core/src/resources/ImplicitPlugins.json
+++ b/solr/core/src/resources/ImplicitPlugins.json
@@ -131,7 +131,11 @@
"useParams":"_TERMS",
"components": [
"terms"
- ]
+ ],
+ "defaults": {
+ "terms": true,
+ "distrib": false
+ }
},
"/analysis/document": {
"class": "solr.DocumentAnalysisRequestHandler",
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-minhash.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-minhash.xml
index 9b973db4df2..bfa396974cd 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-minhash.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-minhash.xml
@@ -295,15 +295,6 @@
-
-
-
-
- termsComp
-
-
-
-
-
+
text
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml
index fd86f9646ea..da02a61eff8 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml
@@ -283,13 +283,6 @@
-
-
-
-
- termsComp
-
-
-
+
text
diff --git a/solr/core/src/test/org/apache/solr/handler/component/DistributedTermsComponentTest.java b/solr/core/src/test/org/apache/solr/handler/component/DistributedTermsComponentTest.java
index ceb91f0bbb7..9f0a26c0104 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/DistributedTermsComponentTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/DistributedTermsComponentTest.java
@@ -51,11 +51,11 @@ public class DistributedTermsComponentTest extends BaseDistributedSearchTestCase
del("*:*");
index(id, random.nextInt(), "b_t", "snake a,b spider shark snail slug seal", "foo_i_p", "1");
- query("qt", "/terms", "shards.qt", "/terms", "terms", "true", "terms.fl", "foo_i_p");
+ query("qt", "/terms", "shards.qt", "/terms", "terms.fl", "foo_i_p");
del("*:*");
// verify point field on empty index
- query("qt", "/terms", "shards.qt", "/terms", "terms", "true", "terms.fl", "foo_i_p");
+ query("qt", "/terms", "shards.qt", "/terms", "terms.fl", "foo_i_p");
index(id, random.nextInt(), "b_t", "snake a,b spider shark snail slug seal", "foo_i", "1");
index(id, random.nextInt(), "b_t", "snake spider shark snail slug", "foo_i", "2", "foo_date_p", "2015-01-03T14:30:00Z");
@@ -70,25 +70,25 @@ public class DistributedTermsComponentTest extends BaseDistributedSearchTestCase
handle.clear();
handle.put("terms", UNORDERED);
- query("qt", "/terms", "shards.qt", "/terms", "terms", "true", "terms.fl", "b_t");
- query("qt", "/terms", "shards.qt", "/terms", "terms.limit", 5, "terms", "true", "terms.fl", "b_t", "terms.lower", "s");
- query("qt", "/terms", "shards.qt", "/terms", "terms.limit", 5, "terms", "true", "terms.fl", "b_t", "terms.prefix", "sn", "terms.lower", "sn");
- query("qt", "/terms", "shards.qt", "/terms", "terms.limit", 5, "terms", "true", "terms.fl", "b_t", "terms.prefix", "s", "terms.lower", "s", "terms.upper", "sn");
+ query("qt", "/terms", "shards.qt", "/terms", "terms.fl", "b_t");
+ query("qt", "/terms", "shards.qt", "/terms", "terms.limit", 5, "terms.fl", "b_t", "terms.lower", "s");
+ query("qt", "/terms", "shards.qt", "/terms", "terms.limit", 5, "terms.fl", "b_t", "terms.prefix", "sn", "terms.lower", "sn");
+ query("qt", "/terms", "shards.qt", "/terms", "terms.limit", 5, "terms.fl", "b_t", "terms.prefix", "s", "terms.lower", "s", "terms.upper", "sn");
// terms.sort
- query("qt", "/terms", "shards.qt", "/terms", "terms.limit", 5, "terms", "true", "terms.fl", "b_t", "terms.prefix", "s", "terms.lower", "s", "terms.sort", "index");
- query("qt", "/terms", "shards.qt", "/terms", "terms.limit", 5, "terms", "true", "terms.fl", "b_t", "terms.prefix", "s", "terms.lower", "s", "terms.upper", "sn", "terms.sort", "index");
- query("qt", "/terms", "shards.qt", "/terms", "terms", "true", "terms.fl", "b_t", "terms.sort", "index");
+ query("qt", "/terms", "shards.qt", "/terms", "terms.limit", 5, "terms.fl", "b_t", "terms.prefix", "s", "terms.lower", "s", "terms.sort", "index");
+ query("qt", "/terms", "shards.qt", "/terms", "terms.limit", 5, "terms.fl", "b_t", "terms.prefix", "s", "terms.lower", "s", "terms.upper", "sn", "terms.sort", "index");
+ query("qt", "/terms", "shards.qt", "/terms", "terms.fl", "b_t", "terms.sort", "index");
// terms.list
- query("qt", "/terms", "shards.qt", "/terms", "terms", "true", "terms.fl", "b_t", "terms.list", "snake,zebra,ant,bad");
- query("qt", "/terms", "shards.qt", "/terms", "terms", "true", "terms.fl", "foo_i", "terms.list", "2,3,1");
- query("qt", "/terms", "shards.qt", "/terms", "terms", "true", "terms.fl", "foo_i", "terms.stats", "true","terms.list", "2,3,1");
- query("qt", "/terms", "shards.qt", "/terms", "terms", "true", "terms.fl", "b_t", "terms.list", "snake,zebra", "terms.ttf", "true");
- query("qt", "/terms", "shards.qt", "/terms", "terms", "true", "terms.fl", "b_t", "terms.fl", "c_t", "terms.list", "snake,ant,zebra", "terms.ttf", "true");
+ query("qt", "/terms", "shards.qt", "/terms", "terms.fl", "b_t", "terms.list", "snake,zebra,ant,bad");
+ query("qt", "/terms", "shards.qt", "/terms", "terms.fl", "foo_i", "terms.list", "2,3,1");
+ query("qt", "/terms", "shards.qt", "/terms", "terms.fl", "foo_i", "terms.stats", "true","terms.list", "2,3,1");
+ query("qt", "/terms", "shards.qt", "/terms", "terms.fl", "b_t", "terms.list", "snake,zebra", "terms.ttf", "true");
+ query("qt", "/terms", "shards.qt", "/terms", "terms.fl", "b_t", "terms.fl", "c_t", "terms.list", "snake,ant,zebra", "terms.ttf", "true");
// for date point field
- query("qt", "/terms", "shards.qt", "/terms", "terms", "true", "terms.fl", "foo_date_p");
+ query("qt", "/terms", "shards.qt", "/terms", "terms.fl", "foo_date_p");
// terms.ttf=true doesn't work for point fields
- //query("qt", "/terms", "shards.qt", "/terms", "terms", "true", "terms.fl", "foo_date_p", "terms.ttf", "true");
+ //query("qt", "/terms", "shards.qt", "/terms", "terms.fl", "foo_date_p", "terms.ttf", "true");
}
protected QueryResponse query(Object... q) throws Exception {
diff --git a/solr/core/src/test/org/apache/solr/handler/component/TermsComponentTest.java b/solr/core/src/test/org/apache/solr/handler/component/TermsComponentTest.java
index 660498ae900..e53c6387c69 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/TermsComponentTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/TermsComponentTest.java
@@ -86,7 +86,7 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
@Test
public void testEmptyLower() throws Exception {
- assertQ(req("indent","true", "qt","/terms", "terms","true", "terms.fl","lowerfilt", "terms.upper","b")
+ assertQ(req("indent","true", "qt","/terms", "terms.fl","lowerfilt", "terms.upper","b")
,"count(//lst[@name='lowerfilt']/*)=6"
,"//int[@name='a'] "
,"//int[@name='aa'] "
@@ -100,7 +100,7 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
@Test
public void testMultipleFields() throws Exception {
- assertQ(req("indent","true", "qt","/terms", "terms","true",
+ assertQ(req("indent","true", "qt","/terms",
"terms.fl","lowerfilt", "terms.upper","b",
"terms.fl","standardfilt")
,"count(//lst[@name='lowerfilt']/*)=6"
@@ -111,13 +111,13 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
@Test
public void testUnlimitedRows() throws Exception {
- assertQ(req("indent","true", "qt","/terms", "terms","true",
+ assertQ(req("indent","true", "qt","/terms",
"terms.fl","lowerfilt",
"terms.fl","standardfilt")
,"count(//lst[@name='lowerfilt']/*)=9"
,"count(//lst[@name='standardfilt']/*)=10"
);
- assertQ(req("indent","true", "qt","/terms", "terms","true",
+ assertQ(req("indent","true", "qt","/terms",
"terms.fl","lowerfilt",
"terms.fl","standardfilt",
"terms.limit","-1")
@@ -130,7 +130,7 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
@Test
public void testPrefix() throws Exception {
- assertQ(req("indent","true", "qt","/terms", "terms","true",
+ assertQ(req("indent","true", "qt","/terms",
"terms.fl","lowerfilt", "terms.upper","b",
"terms.fl","standardfilt",
"terms.lower","aa", "terms.lower.incl","false", "terms.prefix","aa", "terms.upper","b", "terms.limit","50")
@@ -141,7 +141,7 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
@Test
public void testRegexp() throws Exception {
- assertQ(req("indent","true", "qt","/terms", "terms","true",
+ assertQ(req("indent","true", "qt","/terms",
"terms.fl","standardfilt",
"terms.lower","a", "terms.lower.incl","false",
"terms.upper","c", "terms.upper.incl","true",
@@ -168,7 +168,7 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
@Test
public void testRegexpWithFlags() throws Exception {
// TODO: there are no uppercase or mixed-case terms in the index!
- assertQ(req("indent", "true", "qt", "/terms", "terms", "true",
+ assertQ(req("indent", "true", "qt", "/terms",
"terms.fl", "standardfilt",
"terms.lower", "a", "terms.lower.incl", "false",
"terms.upper", "c", "terms.upper.incl", "true",
@@ -180,7 +180,7 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
@Test
public void testSortCount() throws Exception {
- assertQ(req("indent","true", "qt","/terms", "terms","true",
+ assertQ(req("indent","true", "qt","/terms",
"terms.fl","standardfilt",
"terms.lower","s", "terms.lower.incl","false",
"terms.prefix","s",
@@ -196,7 +196,7 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
@Test
public void testTermsList() throws Exception {
//Terms list always returns in index order
- assertQ(req("indent","true", "qt","/terms", "terms","true",
+ assertQ(req("indent","true", "qt","/terms",
"terms.fl","standardfilt",
"terms.list","spider,snake,a\\,b,shark,ddddd,bad")
,"count(//lst[@name='standardfilt']/*)=5"
@@ -209,7 +209,7 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
//Test with numeric terms
- assertQ(req("indent","true", "qt","/terms", "terms","true",
+ assertQ(req("indent","true", "qt","/terms",
"terms.fl","foo_i",
"terms.list","2,1")
,"count(//lst[@name='foo_i']/*)=2"
@@ -222,7 +222,7 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
@Test
public void testStats() throws Exception {
//Terms list always returns in index order
- assertQ(req("indent", "true", "qt", "/terms", "terms", "true",
+ assertQ(req("indent", "true", "qt", "/terms",
"terms.fl", "standardfilt","terms.stats", "true",
"terms.list", "spider,snake,shark,ddddd,bad")
, "//lst[@name='indexstats']/long[1][@name='numDocs'][.='24']"
@@ -231,7 +231,7 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
@Test
public void testSortIndex() throws Exception {
- assertQ(req("indent","true", "qt","/terms", "terms","true",
+ assertQ(req("indent","true", "qt","/terms",
"terms.fl","standardfilt",
"terms.lower","s", "terms.lower.incl","false",
"terms.prefix","s",
@@ -245,7 +245,7 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
@Test
public void testPastUpper() throws Exception {
- assertQ(req("indent","true", "qt","/terms", "terms","true",
+ assertQ(req("indent","true", "qt","/terms",
"terms.fl","lowerfilt",
//no upper bound, lower bound doesn't exist
"terms.lower","d")
@@ -255,7 +255,7 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
@Test
public void testLowerExclusive() throws Exception {
- assertQ(req("indent","true", "qt","/terms", "terms","true",
+ assertQ(req("indent","true", "qt","/terms",
"terms.fl","lowerfilt",
"terms.lower","a", "terms.lower.incl","false",
"terms.upper","b")
@@ -267,7 +267,7 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
,"//int[@name='abc'] "
);
- assertQ(req("indent","true", "qt","/terms", "terms","true",
+ assertQ(req("indent","true", "qt","/terms",
"terms.fl","standardfilt",
"terms.lower","cc", "terms.lower.incl","false",
"terms.upper","d")
@@ -277,7 +277,7 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
@Test
public void test() throws Exception {
- assertQ(req("indent","true", "qt","/terms", "terms","true",
+ assertQ(req("indent","true", "qt","/terms",
"terms.fl","lowerfilt",
"terms.lower","a",
"terms.upper","b")
@@ -290,7 +290,7 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
,"//int[@name='abc'] "
);
- assertQ(req("indent","true", "qt","/terms", "terms","true",
+ assertQ(req("indent","true", "qt","/terms",
"terms.fl","lowerfilt",
"terms.lower","a",
"terms.upper","b",
@@ -301,20 +301,20 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
,"//int[@name='aa']"
);
- assertQ(req("indent","true", "qt","/terms", "terms","true",
+ assertQ(req("indent","true", "qt","/terms",
"terms.fl","foo_i")
,"//int[@name='1'][.='2']"
);
/* terms.raw only applies to indexed fields
- assertQ(req("indent","true", "qt","/terms", "terms","true",
+ assertQ(req("indent","true", "qt","/terms",
"terms.fl","foo_i", "terms.raw","true")
,"not(//int[@name='1'][.='2'])"
);
*/
// check something at the end of the index
- assertQ(req("indent","true", "qt","/terms", "terms","true",
+ assertQ(req("indent","true", "qt","/terms",
"terms.fl","zzz_i")
,"count(//lst[@name='zzz_i']/*)=0"
);
@@ -322,7 +322,7 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
@Test
public void testMinMaxFreq() throws Exception {
- assertQ(req("indent","true", "qt","/terms", "terms","true",
+ assertQ(req("indent","true", "qt","/terms",
"terms.fl","lowerfilt",
"terms.lower","a",
"terms.mincount","2",
@@ -331,7 +331,7 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
,"count(//lst[@name='lowerfilt']/*)=1"
);
- assertQ(req("indent","true", "qt","/terms", "terms","true",
+ assertQ(req("indent","true", "qt","/terms",
"terms.fl","standardfilt",
"terms.lower","d",
"terms.mincount","2",
@@ -344,7 +344,7 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
@Test
public void testTermsWithJSON() throws Exception {
ModifiableSolrParams params = params(
- "qt", "/terms", "terms", "true", "terms.fl", "standardfilt", "terms.lower", "a",
+ "qt", "/terms", "terms.fl", "standardfilt", "terms.lower", "a",
"terms.sort", "index", "wt", "json"
);
@@ -376,7 +376,6 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
SolrQueryRequest req = req(
"indent","true",
"qt", "/terms",
- "terms", "true",
"terms.fl", "standardfilt",
"terms.ttf", "true",
"terms.list", "snake,spider,shark,ddddd");
@@ -395,7 +394,6 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
req = req(
"indent","true",
"qt", "/terms",
- "terms", "true",
"terms.fl", "standardfilt",
"terms.ttf", "true",
"terms.limit", "-1",
@@ -418,7 +416,6 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
SolrQueryRequest req = req(
"indent","true",
"qt", "/terms",
- "terms", "true",
"terms.fl", "standardfilt",
"terms.ttf", "true",
"terms.list", "boo,snake");
@@ -433,7 +430,6 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
SolrQueryRequest req = req(
"indent","true",
"qt", "/terms",
- "terms", "true",
"terms.fl", "lowerfilt",
"terms.fl", "standardfilt",
"terms.ttf", "true",
@@ -458,7 +454,6 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
req = req(
"indent","true",
"qt", "/terms",
- "terms", "true",
"terms.fl", "lowerfilt",
"terms.fl", "standardfilt",
"terms.ttf", "true",
@@ -509,7 +504,6 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
SolrQueryRequest req = req(
"qt", "/terms",
- "terms", "true",
"terms.fl", "foo_pi");
;
try {
@@ -588,7 +582,7 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
}
assert(i==nvals);
- assertQ(req("indent","true", "qt","/terms", "terms","true",
+ assertQ(req("indent","true", "qt","/terms",
"terms.fl","foo_pi", "terms.sort","index", "terms.limit","2")
,"count(//lst[@name='foo_pi']/*)=2"
,"//lst[@name='foo_pi']/int[1][@name='" +val1+ "']"
@@ -637,7 +631,7 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
assertU(adoc("id", Integer.toString(100102), "foo_pdt", dates[1]));
assertU(commit());
- assertQ(req("indent","true", "qt","/terms", "terms","true",
+ assertQ(req("indent","true", "qt","/terms",
"terms.fl","foo_pdt", "terms.sort","count"),
"count(//lst[@name='foo_pdt']/*)=2",
"//lst[@name='foo_pdt']/int[1][@name='" + dates[1] + "'][.='51']",
@@ -648,7 +642,7 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
assertU(delQ("*:*"));
assertU(commit());
- assertQ(req("indent","true", "qt","/terms", "terms","true",
+ assertQ(req("indent","true", "qt","/terms",
"terms.fl","foo_pdt", "terms.sort","count"),
"count(//lst[@name='foo_pdt']/*)=0"
);
diff --git a/solr/core/src/test/org/apache/solr/update/TestNestedUpdateProcessor.java b/solr/core/src/test/org/apache/solr/update/TestNestedUpdateProcessor.java
index a3844adaed2..4ffcdfea789 100644
--- a/solr/core/src/test/org/apache/solr/update/TestNestedUpdateProcessor.java
+++ b/solr/core/src/test/org/apache/solr/update/TestNestedUpdateProcessor.java
@@ -127,7 +127,7 @@ public class TestNestedUpdateProcessor extends SolrTestCaseJ4 {
public void testNumberInName() throws Exception {
// child named "grandChild99" (has a number in it)
indexSampleData(jDoc.replace("grandChild", "grandChild99"));
- //assertQ(req("qt", "/terms", "terms", "true", "terms.fl", IndexSchema.NEST_PATH_FIELD_NAME), "false"); // for debugging
+ //assertQ(req("qt", "/terms", "terms.fl", IndexSchema.NEST_PATH_FIELD_NAME), "false"); // for debugging
// find it
assertJQ(req("q", "{!field f=" + IndexSchema.NEST_PATH_FIELD_NAME + "}/children/grandChild99"),
diff --git a/solr/server/solr/configsets/_default/conf/solrconfig.xml b/solr/server/solr/configsets/_default/conf/solrconfig.xml
index a69e46c41de..61a09b28b15 100644
--- a/solr/server/solr/configsets/_default/conf/solrconfig.xml
+++ b/solr/server/solr/configsets/_default/conf/solrconfig.xml
@@ -848,6 +848,7 @@
+
Default configuration in a requestHandler would look like:
@@ -966,26 +967,6 @@
-
-
-
-
-
-
- true
- false
-
-
- terms
-
-
-
-
-
-
-
-
- true
- false
-
-
- terms
-
-
-