Apache Solr open-source search software
SOLR-14920: Spotless formatting for core - test only - followup (#720)
Kevin Risden7f7033e24169
diff --git a/solr/core/src/java/org/apache/solr/api/V2HttpCall.java b/solr/core/src/java/org/apache/solr/api/V2HttpCall.javaindex 76772f47cd8..effd8b1ab35 100644--- a/solr/core/src/java/org/apache/solr/api/V2HttpCall.java+++ b/solr/core/src/java/org/apache/solr/api/V2HttpCall.java@@ -229,7 +229,7 @@ public class V2HttpCall extends HttpSolrCall {fullPath = fullPath == null ? path : fullPath;Api api = requestHandlers.v2lookup(path, method, parts);if (api == null && path.endsWith(CommonParams.INTROSPECT)) {- // the particular http method does not have any ,+ // the particular http method does not have any,// just try if any other method has this pathapi = requestHandlers.v2lookup(path, null, parts);}diff --git a/solr/core/src/java/org/apache/solr/core/SolrResourceLoader.java b/solr/core/src/java/org/apache/solr/core/SolrResourceLoader.javaindex ab3f5e748b7..63d083b5788 100644--- a/solr/core/src/java/org/apache/solr/core/SolrResourceLoader.java+++ b/solr/core/src/java/org/apache/solr/core/SolrResourceLoader.java@@ -885,7 +885,7 @@ public class SolrResourceLoader implements ResourceLoader, Closeable, SolrClassLif(info.cName.pkg == null) {return newInstance(info.cName.className == null?type.getName():- info.cName.className ,+ info.cName.className,type);}return _classLookup( info, version -> version.getLoader().newInstance(info.cName.className, type), registerCoreReloadListener);diff --git a/solr/core/src/java/org/apache/solr/request/SolrQueryRequest.java b/solr/core/src/java/org/apache/solr/request/SolrQueryRequest.javaindex ec25bb84e73..fe3e6b7bc90 100644--- a/solr/core/src/java/org/apache/solr/request/SolrQueryRequest.java+++ b/solr/core/src/java/org/apache/solr/request/SolrQueryRequest.java@@ -114,7 +114,7 @@ public interface SolrQueryRequest extends AutoCloseable {}/** Only for V2 API.- * Returns a map of path segments and their values . For example ,+ * Returns a map of path segments and their values . For example,* if the path is configured as /path/{segment1}/{segment2} and a reguest is made* as /path/x/y the returned map would contain {segment1:x ,segment2:y}*/diff --git a/solr/core/src/java/org/apache/solr/security/Permission.java b/solr/core/src/java/org/apache/solr/security/Permission.javaindex d569826e743..8b787f0c5c6 100644--- a/solr/core/src/java/org/apache/solr/security/Permission.java+++ b/solr/core/src/java/org/apache/solr/security/Permission.java@@ -120,7 +120,7 @@ class Permission {return set == null ? singleton(null) : set;}/**- * read a key value as a set. if the value is a single string ,+ * read a key value as a set. if the value is a single string,* return a singleton set** @param m the map from which to lookupdiff --git a/solr/core/src/test/org/apache/solr/CursorPagingTest.java b/solr/core/src/test/org/apache/solr/CursorPagingTest.javaindex e3b1b28aead..698f55c15fd 100644--- a/solr/core/src/test/org/apache/solr/CursorPagingTest.java+++ b/solr/core/src/test/org/apache/solr/CursorPagingTest.java@@ -143,8 +143,7 @@ public class CursorPagingTest extends SolrTestCaseJ4 {params(CURSOR_MARK_PARAM, "gibberish", "sort", "id asc"))) {assertJQ(req(p, "qt", "/get", "fl", "id", "id", "yyy"), "=={'doc':{'id':'yyy'}}");assertJQ(- req(p, "qt", "/get", "fl", "id", "id", "xxx") // doesn't exist in our collection- ,+ req(p, "qt", "/get", "fl", "id", "id", "xxx"), // doesn't exist in our collection"=={'doc':null}");}}diff --git a/solr/core/src/test/org/apache/solr/TestGroupingSearch.java b/solr/core/src/test/org/apache/solr/TestGroupingSearch.javaindex 42ed7de1610..2cc1e24052b 100644--- a/solr/core/src/test/org/apache/solr/TestGroupingSearch.java+++ b/solr/core/src/test/org/apache/solr/TestGroupingSearch.java@@ -332,14 +332,12 @@ public class TestGroupingSearch extends SolrTestCaseJ4 {"group.sort","weight desc"),"*[count(//arr[@name='groups']/lst) = 2]",- "//arr[@name='groups']/lst[1]/str[@name='groupValue'][.='author1']"+ "//arr[@name='groups']/lst[1]/str[@name='groupValue'][.='author1']",// ,"//arr[@name='groups']/lst[1]/int[@name='matches'][.='2']"- ,"//arr[@name='groups']/lst[1]/result[@numFound='2']","//arr[@name='groups']/lst[1]/result/doc/*[@name='id'][.='1']",- "//arr[@name='groups']/lst[2]/str[@name='groupValue'][.='author2']"+ "//arr[@name='groups']/lst[2]/str[@name='groupValue'][.='author2']",// ,"//arr[@name='groups']/lst[2]/int[@name='matches'][.='2']"- ,"//arr[@name='groups']/lst[2]/result[@numFound='2']","//arr[@name='groups']/lst[2]/result/doc/*[@name='id'][.='4']");}@@ -807,13 +805,12 @@ public class TestGroupingSearch extends SolrTestCaseJ4 {assertJQ(req("fq", filt, "q", "{!func}" + f2, "group", "true", "group.field", f, "fl", "id"),- "/responseHeader/status==0" // exact match- ,- "/responseHeader=={'_SKIP_':'QTime', 'status':0}" // partial match by skipping some elements- ,- "/responseHeader=={'_MATCH_':'status', 'status':0}" // partial match by only including some- // elements- ,+ // exact match+ "/responseHeader/status==0",+ // partial match by skipping some elements+ "/responseHeader=={'_SKIP_':'QTime', 'status':0}",+ // partial match by only including some elements+ "/responseHeader=={'_MATCH_':'status', 'status':0}","/grouped=={'"+ f+ "':{'matches':10,'groups':[\n"@@ -1787,9 +1784,8 @@ public class TestGroupingSearch extends SolrTestCaseJ4 {sortStr == null ? "nosort" : "sort",sortStr == null ? "" : sortStr,"fl",- "*,score_ff,foo_ii,foo_bdv,"- + FOO_STRING_DOCVAL_FIELD // only docValued fields are not returned by default- ,+ // only docValued fields are not returned by default+ "*,score_ff,foo_ii,foo_bdv," + FOO_STRING_DOCVAL_FIELD,(groupSortStr == null || groupSortStr == sortStr) ? "noGroupsort" : "group.sort",groupSortStr == null ? "" : groupSortStr,"rows",diff --git a/solr/core/src/test/org/apache/solr/cloud/DeleteShardTest.java b/solr/core/src/test/org/apache/solr/cloud/DeleteShardTest.javaindex 9a7dd581d37..0aeaa878d65 100644--- a/solr/core/src/test/org/apache/solr/cloud/DeleteShardTest.java+++ b/solr/core/src/test/org/apache/solr/cloud/DeleteShardTest.java@@ -133,8 +133,6 @@ public class DeleteShardTest extends SolrCloudTestCase {}@Test- // commented 4-Sep-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") //- // added 09-Aug-2018public void testDirectoryCleanupAfterDeleteShard()throws InterruptedException, IOException, SolrServerException {diff --git a/solr/core/src/test/org/apache/solr/cloud/FullSolrCloudDistribCmdsTest.java b/solr/core/src/test/org/apache/solr/cloud/FullSolrCloudDistribCmdsTest.javaindex 7222111bef9..d057cd82a86 100644--- a/solr/core/src/test/org/apache/solr/cloud/FullSolrCloudDistribCmdsTest.java+++ b/solr/core/src/test/org/apache/solr/cloud/FullSolrCloudDistribCmdsTest.java@@ -218,8 +218,7 @@ public class FullSolrCloudDistribCmdsTest extends SolrCloudTestCase {checkShardCounts.run();{ // Send a delete request to core hosting shard1 with a route param for a document that is- // actually in shard2- // Should delete.+ // actually in shard2 should delete.final UpdateRequest deleteRequest = new UpdateRequest();deleteRequest.deleteById("4").withRoute("shard2");shard1.request(deleteRequest);@@ -229,9 +228,9 @@ public class FullSolrCloudDistribCmdsTest extends SolrCloudTestCase {checkShardCounts.run();{ // Send a delete request to core hosting shard1 with NO route param for a document that is- // actually in shard2- // Shouldn't delete, since deleteById requests are not broadcast to all shard leaders.- // (This is effictively a request to delete "5" if an only if it is on shard1)+ // actually in shard2. Shouldn't delete, since deleteById requests are not broadcast to all+ // shard leaders. (This is effictively a request to delete "5" if an only if it is on+ // shard1)final UpdateRequest deleteRequest = new UpdateRequest();deleteRequest.deleteById("5");shard1.request(deleteRequest);diff --git a/solr/core/src/test/org/apache/solr/cloud/SolrCloudExampleTest.java b/solr/core/src/test/org/apache/solr/cloud/SolrCloudExampleTest.javaindex f954c61dcc9..4e4acd63f1f 100644--- a/solr/core/src/test/org/apache/solr/cloud/SolrCloudExampleTest.java+++ b/solr/core/src/test/org/apache/solr/cloud/SolrCloudExampleTest.java@@ -129,8 +129,7 @@ public class SolrCloudExampleTest extends AbstractFullDistribZkTestBase {tool.runTool(cli));// now index docs like bin/post would do but we can't use SimplePostTool because it uses- // System.exit when- // it encounters an error, which JUnit doesn't like ...+ // System.exit when it encounters an error, which JUnit doesn't like ...log.info("Created collection, now posting example docs!");Path exampleDocsDir = Path.of(ExternalPaths.SOURCE_HOME, "example", "exampledocs");assertTrue(exampleDocsDir.toAbsolutePath() + " not found!", Files.isDirectory(exampleDocsDir));diff --git a/solr/core/src/test/org/apache/solr/cloud/SplitShardTest.java b/solr/core/src/test/org/apache/solr/cloud/SplitShardTest.javaindex 7a74e7fedd3..de3181c8d1e 100644--- a/solr/core/src/test/org/apache/solr/cloud/SplitShardTest.java+++ b/solr/core/src/test/org/apache/solr/cloud/SplitShardTest.java@@ -247,15 +247,14 @@ public class SplitShardTest extends SolrCloudTestCase {// Try all docs in the same update requestUpdateRequest updateReq = new UpdateRequest();updateReq.add(sdoc("id", docId));- // UpdateResponse ursp = updateReq.commit(client, collectionName); //+ // UpdateResponse ursp = updateReq.commit(client, collectionName);// uncomment this if you want a commit each timeUpdateResponse ursp = updateReq.process(client, collectionName);assertEquals(0, ursp.getStatus()); // for now, don't accept any failuresif (ursp.getStatus() == 0) {- model.put(- docId,- 1L); // in the future, keep track of a version per document and reuse- // ids to keep index from growing too large+ // in the future, keep track of a version per document and reuse ids to keep+ // index from growing too large+ model.put(docId, 1L);}} catch (Exception e) {fail(e.getMessage());diff --git a/solr/core/src/test/org/apache/solr/cloud/SystemCollectionCompatTest.java b/solr/core/src/test/org/apache/solr/cloud/SystemCollectionCompatTest.javaindex a546cb28f52..4a9df21ca80 100644--- a/solr/core/src/test/org/apache/solr/cloud/SystemCollectionCompatTest.java+++ b/solr/core/src/test/org/apache/solr/cloud/SystemCollectionCompatTest.java@@ -170,8 +170,7 @@ public class SystemCollectionCompatTest extends SolrCloudTestCase {.getIsCollectionApiDistributed()) {log.info("Skipping test because Collection API is distributed");// TODO once we completely remove Overseer, do we need to move the back compat check to some- // other place, for example- // to when the .system collection is opened?+ // other place, for example to when the .system collection is opened?return;}diff --git a/solr/core/src/test/org/apache/solr/cloud/TestSegmentSorting.java b/solr/core/src/test/org/apache/solr/cloud/TestSegmentSorting.javaindex b7275d23801..7f817bc3457 100644--- a/solr/core/src/test/org/apache/solr/cloud/TestSegmentSorting.java+++ b/solr/core/src/test/org/apache/solr/cloud/TestSegmentSorting.java@@ -145,8 +145,7 @@ public class TestSegmentSorting extends SolrCloudTestCase {cloudSolrClient.commit();// do some random iterations of replacing docs, atomic updates against segment sort field, and- // commits- // (at this point we're just sanity checking no serious failures)+ // commits (at this point we're just sanity checking no serious failures)for (int iter = 0; iter < 20; iter++) {final int iterSize = atLeast(20);for (int i = 0; i < iterSize; i++) {diff --git a/solr/core/src/test/org/apache/solr/cloud/TestTolerantUpdateProcessorCloud.java b/solr/core/src/test/org/apache/solr/cloud/TestTolerantUpdateProcessorCloud.javaindex aa50ef63580..7806985ea56 100644--- a/solr/core/src/test/org/apache/solr/cloud/TestTolerantUpdateProcessorCloud.java+++ b/solr/core/src/test/org/apache/solr/cloud/TestTolerantUpdateProcessorCloud.java@@ -745,9 +745,7 @@ public class TestTolerantUpdateProcessorCloud extends SolrCloudTestCase {assertEquals(0, client.commit().getStatus()); // need to force since update didn't finishassertQueryDocIds(client,- false- // explicitly failed- ,+ false, // explicitly failedS_TWO_PRE + "21",S_TWO_PRE + "22",S_TWO_PRE + "23",@@ -855,9 +853,7 @@ public class TestTolerantUpdateProcessorCloud extends SolrCloudTestCase {S_ONE_PRE + "z",S_ONE_PRE + "y",S_TWO_PRE + "z",- S_TWO_PRE + "y" // first- //- ,+ S_TWO_PRE + "y", // firstS_ONE_PRE + "0",S_ONE_PRE + "1",S_ONE_PRE + "2",@@ -870,9 +866,7 @@ public class TestTolerantUpdateProcessorCloud extends SolrCloudTestCase {S_ONE_PRE + "9");assertQueryDocIds(client,- false- // explicitly failed- ,+ false, // explicitly failedS_TWO_PRE + "0",S_TWO_PRE + "1",S_TWO_PRE + "2",@@ -996,8 +990,7 @@ public class TestTolerantUpdateProcessorCloud extends SolrCloudTestCase {S_ONE_PRE + "z",S_ONE_PRE + "y",S_TWO_PRE + "z",- S_TWO_PRE + "y" // first- ,+ S_TWO_PRE + "y", // firstS_ONE_PRE + "x",S_TWO_PRE + "x" // later);diff --git a/solr/core/src/test/org/apache/solr/core/SOLR749Test.java b/solr/core/src/test/org/apache/solr/core/SOLR749Test.javaindex 534e419e4c9..75c88460a7f 100644--- a/solr/core/src/test/org/apache/solr/core/SOLR749Test.java+++ b/solr/core/src/test/org/apache/solr/core/SOLR749Test.java@@ -120,9 +120,11 @@ public class SOLR749Test extends SolrTestCaseJ4 {assertQ("query matching 1 doc w/ implicitly post-filtered frange matching all docs",req(- "q", "{!notfoo cache=false}*:*", // match all...- "fq", "{!frange cache=false l=30 u=30}abs(id_i1)", // ...restrict to 1 match- // post filter will happily match all docs, but should only be asked about 1...+ // match all...+ "q", "{!notfoo cache=false}*:*",+ // ...restrict to 1 match. post filter will happily match all docs, but should only be+ // asked about 1...+ "fq", "{!frange cache=false l=30 u=30}abs(id_i1)","fq", "{!frange cache=false l=4.5 u=4.5 v='countUsage(postfilt_match_all,4.5)'})"),"//result[@numFound=1]");assertEquals(1, CountUsageValueSourceParser.getAndClearCount("postfilt_match_all"));@@ -130,10 +132,11 @@ public class SOLR749Test extends SolrTestCaseJ4 {assertQ("query matching all docs w/ implicitly post-filtered frange matching no docs",req(- "q", "{!notfoo cache=false}id_i1:[20 TO 39]", // match some...- "fq", "{!frange cache=false cost=0 l=50}abs(id_i1)", // ...regular conjunction filter- // rules out all- // post filter will happily match all docs, but should never be asked...+ // match some...+ "q", "{!notfoo cache=false}id_i1:[20 TO 39]",+ // ...regular conjunction filter rules out all post filter will happily match all+ // docs, but should never be asked...+ "fq", "{!frange cache=false cost=0 l=50}abs(id_i1)","fq", "{!frange cache=false l=4.5 u=4.5 v='countUsage(postfilt_match_all,4.5)'})"),"//result[@numFound=0]");assertEquals(0, CountUsageValueSourceParser.getAndClearCount("postfilt_match_all"));@@ -143,16 +146,17 @@ public class SOLR749Test extends SolrTestCaseJ4 {assertQ("query matching 20 -> 10 -> 5 docs; two non-cached queries",req(- "q", "{!notfoo cache=false}id_i1:[20 TO 39]", // match 20- // the below IDs have alternating even/odd pairings so as to test possible sequencing- // of evaluation+ // match 20. the below IDs have alternating even/odd pairings so as to test possible+ // sequencing of evaluation+ "q", "{!notfoo cache=false}id_i1:[20 TO 39]",+ // match 10 (subset of above)+ "fq", "{!notfoo cache=false}id_i1:(20 21 25 26 28 29 31 32 36 37)",+ // eliminate #20"fq",- "{!notfoo cache=false}id_i1:(20 21 25 26 28 29 31 32 36 37)", // match 10 (subset- // of above)+ "{!frange cache=false cost=5 l=21 u=99 v='map(countUsage(lowCost,0),0,0,id_i1)'})",+ // match 5 -- (the odd ones since l=1 thus don't match 0)"fq",- "{!frange cache=false cost=5 l=21 u=99 v='map(countUsage(lowCost,0),0,0,id_i1)'})", // eliminate #20- "fq",- "{!frange cache=false cost=10 l=1 v='mod(map(countUsage(lastFilter,0),0,0,id_i1),2)'}"), // match 5 -- (the odd ones since l=1 thus don't match 0)+ "{!frange cache=false cost=10 l=1 v='mod(map(countUsage(lastFilter,0),0,0,id_i1),2)'}"),"//result[@numFound=5]");assertEquals(10, CountUsageValueSourceParser.getAndClearCount("lowCost"));assertEquals(9, CountUsageValueSourceParser.getAndClearCount("lastFilter"));diff --git a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotLargeTest.java b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotLargeTest.javaindex 99ee8c00ff4..ad2df43b775 100644--- a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotLargeTest.java+++ b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotLargeTest.java@@ -398,8 +398,7 @@ public class DistributedFacetPivotLargeTest extends BaseDistributedSearchTestCas{ // similar to the test above, but now force a restriction on the over request and allow// terms that are early in index sort -- but don't meet the mincount overall -- to be- // considered- // in the first phase. (SOLR-12954)+ // considered in the first phase. (SOLR-12954)SolrParams p =params("q",diff --git a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotSmallTest.java b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotSmallTest.javaindex 27ce80df14c..fd5f8dd0c4a 100644--- a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotSmallTest.java+++ b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotSmallTest.java@@ -2309,8 +2309,7 @@ public class DistributedFacetPivotSmallTest extends BaseDistributedSearchTestCas"{!query=$hang}place_t,company_t");rsp = query(params);// we aren't going to start calculating facet query unless the query is specified with a- // 'facet.query' param- // hence hanging an arbitrary query shouldn't work+ // 'facet.query' param hence hanging an arbitrary query shouldn't workassertNullFacetTypeInsidePivot(FacetParams.FACET_QUERY, rsp.getFacetPivot().get("place_t,company_t"));}diff --git a/solr/core/src/test/org/apache/solr/handler/component/FacetPivotSmallTest.java b/solr/core/src/test/org/apache/solr/handler/component/FacetPivotSmallTest.javaindex f5d84b0b0e2..1465c5840a0 100644--- a/solr/core/src/test/org/apache/solr/handler/component/FacetPivotSmallTest.java+++ b/solr/core/src/test/org/apache/solr/handler/component/FacetPivotSmallTest.java@@ -72,12 +72,10 @@ public class FacetPivotSmallTest extends SolrTestCaseJ4 {index();assertQ(- req("q", "*:*", "facet", "true", "facet.pivot", "{!stats=bogus}place_t,company_t")// check we still get pivots...- ,- "//arr[@name='place_t,company_t']/lst[str[@name='value'][.='dublin']]"+ req("q", "*:*", "facet", "true", "facet.pivot", "{!stats=bogus}place_t,company_t"),+ "//arr[@name='place_t,company_t']/lst[str[@name='value'][.='dublin']]",// .. but sanity check we don't have any stats- ,"count(//arr[@name='place_t,company_t']/lst[str[@name='value'][.='dublin']]/lst[@name='stats'])=0");}@@ -502,21 +500,20 @@ public class FacetPivotSmallTest extends SolrTestCaseJ4 {SolrQueryRequest req = req(missingA);assertQ(req,- facetPivotPrefix + "/arr[@name='pivot'][count(.) > 0]", // not enough values for pivot- facetPivotPrefix + "[7]/null[@name='value'][.='']", // not the missing place value- facetPivotPrefix + "[7]/int[@name='count'][.=2]", // wrong missing place count- facetPivotPrefix- + "[7]/arr[@name='pivot'][count(.) > 0]", // not enough sub-pivots for missing place- facetPivotPrefix- + "[7]/arr[@name='pivot']/lst[6]/null[@name='value'][.='']", // not the missing company- // value- facetPivotPrefix- + "[7]/arr[@name='pivot']/lst[6]/int[@name='count'][.=1]", // wrong missing company- // count- facetPivotPrefix- + "[7]/arr[@name='pivot']/lst[6][not(arr[@name='pivot'])]" // company shouldn't have- // sub-pivots- );+ // not enough values for pivot+ facetPivotPrefix + "/arr[@name='pivot'][count(.) > 0]",+ // not the missing place value+ facetPivotPrefix + "[7]/null[@name='value'][.='']",+ // wrong missing place count+ facetPivotPrefix + "[7]/int[@name='count'][.=2]",+ // not enough sub-pivots for missing place+ facetPivotPrefix + "[7]/arr[@name='pivot'][count(.) > 0]",+ // not the missing company value+ facetPivotPrefix + "[7]/arr[@name='pivot']/lst[6]/null[@name='value'][.='']",+ // wrong missing company count+ facetPivotPrefix + "[7]/arr[@name='pivot']/lst[6]/int[@name='count'][.=1]",+ // company shouldn't have sub-pivots+ facetPivotPrefix + "[7]/arr[@name='pivot']/lst[6][not(arr[@name='pivot'])]");SolrParams missingB =SolrParams.wrapDefaults(@@ -525,21 +522,20 @@ public class FacetPivotSmallTest extends SolrTestCaseJ4 {req = req(missingB);assertQ(req,- facetPivotPrefix + "/arr[@name='pivot'][count(.) > 0]", // not enough values for pivot- facetPivotPrefix + "[5]/null[@name='value'][.='']", // not the missing place value- facetPivotPrefix + "[5]/int[@name='count'][.=2]", // wrong missing place count- facetPivotPrefix- + "[5]/arr[@name='pivot'][count(.) > 0]", // not enough sub-pivots for missing place- facetPivotPrefix- + "[5]/arr[@name='pivot']/lst[5]/null[@name='value'][.='']", // not the missing company- // value- facetPivotPrefix- + "[5]/arr[@name='pivot']/lst[5]/int[@name='count'][.=1]", // wrong missing company- // count- facetPivotPrefix- + "[5]/arr[@name='pivot']/lst[5][not(arr[@name='pivot'])]" // company shouldn't have- // sub-pivots- );+ // not enough values for pivot+ facetPivotPrefix + "/arr[@name='pivot'][count(.) > 0]",+ // not the missing place value+ facetPivotPrefix + "[5]/null[@name='value'][.='']",+ // wrong missing place count+ facetPivotPrefix + "[5]/int[@name='count'][.=2]",+ // not enough sub-pivots for missing place+ facetPivotPrefix + "[5]/arr[@name='pivot'][count(.) > 0]",+ // not the missing company value+ facetPivotPrefix + "[5]/arr[@name='pivot']/lst[5]/null[@name='value'][.='']",+ // wrong missing company count+ facetPivotPrefix + "[5]/arr[@name='pivot']/lst[5]/int[@name='count'][.=1]",+ // company shouldn't have sub-pivots+ facetPivotPrefix + "[5]/arr[@name='pivot']/lst[5][not(arr[@name='pivot'])]");SolrParams missingC =SolrParams.wrapDefaults(@@ -547,21 +543,20 @@ public class FacetPivotSmallTest extends SolrTestCaseJ4 {assertQ(req(missingC),- facetPivotPrefix + "/arr[@name='pivot'][count(.) > 0]", // not enough values for pivot- facetPivotPrefix + "[1]/null[@name='value'][.='']", // not the missing place value- facetPivotPrefix + "[1]/int[@name='count'][.=2]", // wrong missing place count- facetPivotPrefix- + "[1]/arr[@name='pivot'][count(.) > 0]", // not enough sub-pivots for missing place- facetPivotPrefix- + "[1]/arr[@name='pivot']/lst[1]/null[@name='value'][.='']", // not the missing company- // value- facetPivotPrefix- + "[1]/arr[@name='pivot']/lst[1]/int[@name='count'][.=1]", // wrong missing company- // count- facetPivotPrefix- + "[1]/arr[@name='pivot']/lst[1][not(arr[@name='pivot'])]" // company shouldn't have- // sub-pivots- );+ // not enough values for pivot+ facetPivotPrefix + "/arr[@name='pivot'][count(.) > 0]",+ // not the missing place value+ facetPivotPrefix + "[1]/null[@name='value'][.='']",+ // wrong missing place count+ facetPivotPrefix + "[1]/int[@name='count'][.=2]",+ // not enough sub-pivots for missing place+ facetPivotPrefix + "[1]/arr[@name='pivot'][count(.) > 0]",+ // not the missing company value+ facetPivotPrefix + "[1]/arr[@name='pivot']/lst[1]/null[@name='value'][.='']",+ // wrong missing company count+ facetPivotPrefix + "[1]/arr[@name='pivot']/lst[1]/int[@name='count'][.=1]",+ // company shouldn't have sub-pivots+ facetPivotPrefix + "[1]/arr[@name='pivot']/lst[1][not(arr[@name='pivot'])]");}public void testPivotFacetIndexSortMincountAndLimit() throws Exception {diff --git a/solr/core/src/test/org/apache/solr/handler/component/PhrasesIdentificationComponentTest.java b/solr/core/src/test/org/apache/solr/handler/component/PhrasesIdentificationComponentTest.javaindex b2c6def2eeb..3e7947a12af 100644--- a/solr/core/src/test/org/apache/solr/handler/component/PhrasesIdentificationComponentTest.java+++ b/solr/core/src/test/org/apache/solr/handler/component/PhrasesIdentificationComponentTest.java@@ -698,24 +698,15 @@ public class PhrasesIdentificationComponentTest extends SolrTestCaseJ4 {for (String p : Arrays.asList("q", "phrases.q")) {// basic request...assertQ(- req("qt", HANDLER, p, input)- // expect no search results...- ,- "count(//result)=0"-- // just phrase info...- ,+ req("qt", HANDLER, p, input), // expect no search results...+ "count(//result)=0", // just phrase info..."//lst[@name='phrases']/str[@name='input'][.='" + input + "']","//lst[@name='phrases']/str[@name='summary'][.='" + expected + "']",- "count(//lst[@name='phrases']/arr[@name='details']/lst) = 2"- //- ,+ "count(//lst[@name='phrases']/arr[@name='details']/lst) = 2","//lst[@name='phrases']/arr[@name='details']/lst[1]/str[@name='text'][.='the lazy dog']","//lst[@name='phrases']/arr[@name='details']/lst[1]/int[@name='offset_start'][.='50']","//lst[@name='phrases']/arr[@name='details']/lst[1]/int[@name='offset_end'][.='62']",- "//lst[@name='phrases']/arr[@name='details']/lst[1]/double[@name='score'][number(.) > 0]"- //- ,+ "//lst[@name='phrases']/arr[@name='details']/lst[1]/double[@name='score'][number(.) > 0]","//lst[@name='phrases']/arr[@name='details']/lst[2]/str[@name='text'][.='brown FOX']","//lst[@name='phrases']/arr[@name='details']/lst[2]/int[@name='offset_start'][.='17']","//lst[@name='phrases']/arr[@name='details']/lst[2]/int[@name='offset_end'][.='26']",@@ -723,12 +714,8 @@ public class PhrasesIdentificationComponentTest extends SolrTestCaseJ4 {// empty input, empty phrases (and no error)...assertQ(- req("qt", HANDLER, p, "")- // expect no search results...- ,- "count(//result)=0"- // just empty phrase info for our empty input...- ,+ req("qt", HANDLER, p, ""), // expect no search results...+ "count(//result)=0", // just empty phrase info for our empty input..."//lst[@name='phrases']/str[@name='input'][.='']","//lst[@name='phrases']/str[@name='summary'][.='']","count(//lst[@name='phrases']/arr[@name='details']) = 1",@@ -740,25 +727,19 @@ public class PhrasesIdentificationComponentTest extends SolrTestCaseJ4 {final String input = "\"brown fox\"";assertQ(- req("q", input)- // basic search should have worked...- ,+ req("q", input), // basic search should have worked..."//result[@numFound='2']","//result/doc/str[@name='id'][.='42']",- "//result/doc/str[@name='id'][.='43']"+ "//result/doc/str[@name='id'][.='43']",// and phrases should not be returned since they weren't requested...- ,"0=count(//lst[@name='phrases'])");assertQ(- req("phrases", "false", "q", input)- // basic search should have worked...- ,+ req("phrases", "false", "q", input), // basic search should have worked..."//result[@numFound='2']","//result/doc/str[@name='id'][.='42']",- "//result/doc/str[@name='id'][.='43']"+ "//result/doc/str[@name='id'][.='43']",// and phrases should not be returned since they were explicitly disabled...- ,"0=count(//lst[@name='phrases'])");// with input this short, all of these permutations of requests should produce the same@@ -787,15 +768,10 @@ public class PhrasesIdentificationComponentTest extends SolrTestCaseJ4 {"phrases.analysis.field","multigrams_title_short"))) {assertQ(- req- // basic search should have worked...- ,+ req, // basic search should have worked..."//result[@numFound='2']","//result/doc/str[@name='id'][.='42']",- "//result/doc/str[@name='id'][.='43']"-- // and we should have gotten phrase info...- ,+ "//result/doc/str[@name='id'][.='43']", // and we should have gotten phrase info..."//lst[@name='phrases']/str[@name='input'][.='" + input + "']","//lst[@name='phrases']/str[@name='summary'][.='\"{brown fox}\"']","count(//lst[@name='phrases']/arr[@name='details']/lst)=1",@@ -807,12 +783,10 @@ public class PhrasesIdentificationComponentTest extends SolrTestCaseJ4 {// override the query string to get different phrasesassertQ(- req("phrases", "true", "q", "*:*", "phrases.q", input)+ req("phrases", "true", "q", "*:*", "phrases.q", input),// basic search should have found all docs...- ,- "//result[@numFound='4']"+ "//result[@numFound='4']",// and we should have gotten phrase info for our alternative q string...- ,"//lst[@name='phrases']/str[@name='input'][.='" + input + "']","//lst[@name='phrases']/str[@name='summary'][.='\"{brown fox}\"']","count(//lst[@name='phrases']/arr[@name='details']/lst)=1",@@ -823,12 +797,10 @@ public class PhrasesIdentificationComponentTest extends SolrTestCaseJ4 {// empty input, empty phrases (but no error)assertQ(- req("phrases", "true", "q", "*:*", "phrases.q", "")+ req("phrases", "true", "q", "*:*", "phrases.q", ""),// basic search should have found all docs...- ,- "//result[@numFound='4']"+ "//result[@numFound='4']",// and we should have gotten (empty) phrase info for our alternative q string...- ,"//lst[@name='phrases']/str[@name='input'][.='']","//lst[@name='phrases']/str[@name='summary'][.='']","count(//lst[@name='phrases']/arr[@name='details']) = 1",@@ -851,27 +823,22 @@ public class PhrasesIdentificationComponentTest extends SolrTestCaseJ4 {ShardParams.IS_SHARD,"true",ShardParams.SHARDS_PURPOSE,- "" + PhrasesIdentificationComponent.SHARD_PURPOSE)+ "" + PhrasesIdentificationComponent.SHARD_PURPOSE),// this shard request should have caused stats to be returned about all phrases...- ,- "10=count(" + all_phrase_xpath + "/lst)"+ "10=count(" + all_phrase_xpath + "/lst)",// "quick" ...- ,all_phrase_xpath + "/lst[1]/lst[@name='ttf']/long[@name='multigrams_body'][.='1']",- all_phrase_xpath + "/lst[1]/lst[@name='ttf']/long[@name='multigrams_title'][.='0']"- // ...- // "brown fox"- ,+ all_phrase_xpath + "/lst[1]/lst[@name='ttf']/long[@name='multigrams_title'][.='0']",+ // ... "brown fox"all_phrase_xpath + "/lst[6]/lst[@name='ttf']/long[@name='multigrams_body'][.='3']",all_phrase_xpath + "/lst[6]/lst[@name='ttf']/long[@name='multigrams_title'][.='1']",all_phrase_xpath + "/lst[6]/lst[@name='df']/long[@name='multigrams_body'][.='2']",all_phrase_xpath + "/lst[6]/lst[@name='df']/long[@name='multigrams_title'][.='1']",all_phrase_xpath + "/lst[6]/lst[@name='conj_dc']/long[@name='multigrams_body'][.='2']",- all_phrase_xpath + "/lst[6]/lst[@name='conj_dc']/long[@name='multigrams_title'][.='1']"+ all_phrase_xpath + "/lst[6]/lst[@name='conj_dc']/long[@name='multigrams_title'][.='1']",// but no computed "scores"...- ,"0=count(" + phrase_xpath + "//*[@name='score'])");// phrases requested, but incorrect request stage / shard purpose ...diff --git a/solr/core/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java b/solr/core/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.javaindex 8d26eae2511..dd1fc536481 100644--- a/solr/core/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java+++ b/solr/core/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java@@ -679,10 +679,8 @@ public class QueryElevationComponentTest extends SolrTestCaseJ4 {"useConfiguredElevatedOrder=false",req(baseParams, "sort", "str_s1 asc,id desc", "useConfiguredElevatedOrder", "false"),"//*[@numFound='4']",- "//result/doc[1]/str[@name='id'][.='x']" // group1- ,- "//result/doc[2]/str[@name='id'][.='a']" // group1- ,+ "//result/doc[1]/str[@name='id'][.='x']", // group1+ "//result/doc[2]/str[@name='id'][.='a']", // group1"//result/doc[3]/str[@name='id'][.='c']","//result/doc[4]/str[@name='id'][.='b']");@@ -700,10 +698,8 @@ public class QueryElevationComponentTest extends SolrTestCaseJ4 {"useConfiguredElevatedOrder=false and forceElevation",req(baseParams, "sort", "id desc", "useConfiguredElevatedOrder", "false"),"//*[@numFound='4']",- "//result/doc[1]/str[@name='id'][.='x']" // force elevated- ,- "//result/doc[2]/str[@name='id'][.='a']" // force elevated- ,+ "//result/doc[1]/str[@name='id'][.='x']", // force elevated+ "//result/doc[2]/str[@name='id'][.='a']", // force elevated"//result/doc[3]/str[@name='id'][.='c']","//result/doc[4]/str[@name='id'][.='b']");diff --git a/solr/core/src/test/org/apache/solr/handler/component/StatsComponentTest.java b/solr/core/src/test/org/apache/solr/handler/component/StatsComponentTest.javaindex 0cd47fdfe6e..039b9f58891 100644--- a/solr/core/src/test/org/apache/solr/handler/component/StatsComponentTest.java+++ b/solr/core/src/test/org/apache/solr/handler/component/StatsComponentTest.java@@ -208,10 +208,9 @@ public class StatsComponentTest extends SolrTestCaseJ4 {"fq","{!tag=key_ex_tag}-id:4","stats.field",- "{!key=" + key + " ex=key_ex_tag," + all_possible_ex + "}" + f)+ "{!key=" + key + " ex=key_ex_tag," + all_possible_ex + "}" + f),// field name key, fq is applied- ,fpre + "double[@name='min'][.='-30.0']",fpre + "double[@name='max'][.='-10.0']",fpre + "double[@name='sum'][.='-60.0']",@@ -221,10 +220,9 @@ public class StatsComponentTest extends SolrTestCaseJ4 {"count(" + fpre + "arr[@name='distinctValues']/*)=3",fpre + "double[@name='sumOfSquares'][.='1400.0']",fpre + "double[@name='mean'][.='-20.0']",- fpre + "double[@name='stddev'][.='10.0']"+ fpre + "double[@name='stddev'][.='10.0']",// overridden key, fq is excluded- ,kpre + "double[@name='min'][.='-40.0']",kpre + "double[@name='max'][.='-10.0']",kpre + "double[@name='sum'][.='-100.0']",@@ -414,9 +412,8 @@ public class StatsComponentTest extends SolrTestCaseJ4 {if (!json) { // checking stats.facet makes no sense for json facetingassertQ("test stats.facet (using boolean facet field)",- req(baseParams, "q", "*:*", "stats.calcdistinct", "true", "stats.facet", "active_s")+ req(baseParams, "q", "*:*", "stats.calcdistinct", "true", "stats.facet", "active_s"),// baseline- ,"//lst[@name='" + f + "']/double[@name='min'][.='-100.0']","//lst[@name='" + f + "']/double[@name='max'][.='200.0']","//lst[@name='" + f + "']/double[@name='sum'][.='9.0']",@@ -426,9 +423,8 @@ public class StatsComponentTest extends SolrTestCaseJ4 {"count(//lst[@name='" + f + "']/arr[@name='distinctValues']/*)=8","//lst[@name='" + f + "']/double[@name='sumOfSquares'][.='53101.0']","//lst[@name='" + f + "']/double[@name='mean'][.='1.125']",- "//lst[@name='" + f + "']/double[@name='stddev'][.='87.08852228787508']"+ "//lst[@name='" + f + "']/double[@name='stddev'][.='87.08852228787508']",// facet 'true'- ,"//lst[@name='true']/double[@name='min'][.='-100.0']","//lst[@name='true']/double[@name='max'][.='200.0']","//lst[@name='true']/double[@name='sum'][.='70.0']",@@ -438,9 +434,8 @@ public class StatsComponentTest extends SolrTestCaseJ4 {"count(//lst[@name='true']/arr[@name='distinctValues']/*)=4","//lst[@name='true']/double[@name='sumOfSquares'][.='50500.0']","//lst[@name='true']/double[@name='mean'][.='17.5']",- "//lst[@name='true']/double[@name='stddev'][.='128.16005617976296']"+ "//lst[@name='true']/double[@name='stddev'][.='128.16005617976296']",// facet 'false'- ,"//lst[@name='false']/double[@name='min'][.='-40.0']","//lst[@name='false']/double[@name='max'][.='10.0']","//lst[@name='false']/double[@name='sum'][.='-61.0']",@@ -553,8 +548,7 @@ public class StatsComponentTest extends SolrTestCaseJ4 {"//double[@name='min'][.='0.75']","//double[@name='max'][.='0.875']","//double[@name='sum'][.='2.375']",- json ? "//*" : "//long[@name='count'][.='3']" // SOLR-14010- ,+ json ? "//*" : "//long[@name='count'][.='3']", // SOLR-14010"//long[@name='missing'][.='1']");}}@@ -822,9 +816,7 @@ public class StatsComponentTest extends SolrTestCaseJ4 {"count(" + pre + "/lst[@name='true']/arr[@name='distinctValues']/*)=2",pre + "/lst[@name='true']/double[@name='sumOfSquares'][.='500.0']",pre + "/lst[@name='true']/double[@name='mean'][.='15.0']",- pre + "/lst[@name='true']/double[@name='stddev'][.='7.0710678118654755']"- //- ,+ pre + "/lst[@name='true']/double[@name='stddev'][.='7.0710678118654755']",pre + "/lst[@name='false']/double[@name='min'][.='30.0']",pre + "/lst[@name='false']/double[@name='max'][.='40.0']",pre + "/lst[@name='false']/double[@name='sum'][.='70.0']",@@ -936,9 +928,8 @@ public class StatsComponentTest extends SolrTestCaseJ4 {"//lst[@name='active_i']/double[@name='sum'][.='0.0']","//lst[@name='active_i']/double[@name='sumOfSquares'][.='0.0']","//lst[@name='active_i']/double[@name='stddev'][.='0.0']",- "//lst[@name='active_i']/double[@name='mean'][.='NaN']"+ "//lst[@name='active_i']/double[@name='mean'][.='NaN']",// if new stats are supported, this will break - update test to assert values for each- ,"count(//lst[@name='active_i']/*)=8");// NOTE: empty set percentiles covered in testPercentiles()@@ -971,9 +962,8 @@ public class StatsComponentTest extends SolrTestCaseJ4 {"//lst[@name='active_s']/long[@name='count'][.='0']","//lst[@name='active_s']/long[@name='missing'][.='4']","//lst[@name='active_s']/null[@name='min']",- "//lst[@name='active_s']/null[@name='max']"+ "//lst[@name='active_s']/null[@name='max']",// if new stats are supported, this will break - update test to assert values for each- ,"count(//lst[@name='active_s']/*)=4");assertQ(@@ -1009,10 +999,9 @@ public class StatsComponentTest extends SolrTestCaseJ4 {"//lst[@name='active_dt']/null[@name='mean']","//lst[@name='active_dt']/double[@name='sum'][.='0.0']","//lst[@name='active_dt']/double[@name='sumOfSquares'][.='0.0']",- "//lst[@name='active_dt']/double[@name='stddev'][.='0.0']"+ "//lst[@name='active_dt']/double[@name='stddev'][.='0.0']",// if new stats are supported, this will break - update test to assert values for each- ,"count(//lst[@name='active_dt']/*)=8");assertQ(@@ -1383,12 +1372,10 @@ public class StatsComponentTest extends SolrTestCaseJ4 {"//lst[@name='" + fieldName + "']/double[@name='stddev'][.='5.638074031784151']","//lst[@name='" + fieldName + "']/double[@name='sumOfSquares'][.='470.0']","//lst[@name='" + fieldName + "']/long[@name='missing'][.='0']",- "//lst[@name='" + fieldName + "']/long[@name='countDistinct'][.='9']"+ "//lst[@name='" + fieldName + "']/long[@name='countDistinct'][.='9']",// always comes along with countDistinct- ,- "count(//lst[@name='" + fieldName + "']/arr[@name='distinctValues']/float)=9"+ "count(//lst[@name='" + fieldName + "']/arr[@name='distinctValues']/float)=9",// if new default stats are added, this will break - update test to assert values for each- ,"count(//lst[@name='" + fieldName + "']/*)=10");}@@ -1579,12 +1566,10 @@ public class StatsComponentTest extends SolrTestCaseJ4 {assertQ("min=false: localparam stat means ignore default set, "+ "but since only local param is false no stats should be returned",- req("q", "*:*", "stats", "true", "stats.field", "{!key=k min=false}a_i")+ req("q", "*:*", "stats", "true", "stats.field", "{!key=k min=false}a_i"),// section of stats for this field should exist ...- ,- XPRE + "lst[@name='stats_fields']/lst[@name='k']"+ XPRE + "lst[@name='stats_fields']/lst[@name='k']",// ...but be empty- ,"count(" + kpre + "*)=0");double sum = 0;diff --git a/solr/core/src/test/org/apache/solr/request/SimpleFacetsTest.java b/solr/core/src/test/org/apache/solr/request/SimpleFacetsTest.javaindex 28016a7df26..5f1ea6d2ecb 100644--- a/solr/core/src/test/org/apache/solr/request/SimpleFacetsTest.java+++ b/solr/core/src/test/org/apache/solr/request/SimpleFacetsTest.java@@ -297,14 +297,12 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {public void testDefaultsAndAppends() throws Exception {// all defaultsassertQ(- req("indent", "true", "q", "*:*", "rows", "0", "facet", "true", "qt", "/search-facet-def")+ req("indent", "true", "q", "*:*", "rows", "0", "facet", "true", "qt", "/search-facet-def"),// only one default facet.field- ,"//lst[@name='facet_fields']/lst[@name='foo_s']","count(//lst[@name='facet_fields']/lst[@name='foo_s'])=1",- "count(//lst[@name='facet_fields']/lst)=1"+ "count(//lst[@name='facet_fields']/lst)=1",// only one default facet.query- ,"//lst[@name='facet_queries']/int[@name='foo_s:bar']","count(//lst[@name='facet_queries']/int[@name='foo_s:bar'])=1","count(//lst[@name='facet_queries']/int)=1");@@ -325,14 +323,12 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {"facet.field","bar_s","facet.query",- "bar_s:yak")+ "bar_s:yak"),// override single default facet.field- ,"//lst[@name='facet_fields']/lst[@name='bar_s']","count(//lst[@name='facet_fields']/lst[@name='bar_s'])=1",- "count(//lst[@name='facet_fields']/lst)=1"+ "count(//lst[@name='facet_fields']/lst)=1",// add an additional facet.query- ,"//lst[@name='facet_queries']/int[@name='foo_s:bar']","//lst[@name='facet_queries']/int[@name='bar_s:yak']","count(//lst[@name='facet_queries']/int[@name='foo_s:bar'])=1",@@ -359,14 +355,12 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {ff,"bar_s",fq,- "bar_s:yak")+ "bar_s:yak"),// only one invariant facet.field- ,"//lst[@name='facet_fields']/lst[@name='foo_s']","count(//lst[@name='facet_fields']/lst[@name='foo_s'])=1",- "count(//lst[@name='facet_fields']/lst)=1"+ "count(//lst[@name='facet_fields']/lst)=1",// only one invariant facet.query- ,"//lst[@name='facet_queries']/int[@name='foo_s:bar']","count(//lst[@name='facet_queries']/int[@name='foo_s:bar'])=1","count(//lst[@name='facet_queries']/int)=1");@@ -873,14 +867,11 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {"facet.query","{!ex=1}trait_s:Obnoxious","facet.query",- "{!ex=2 key=foo}id_i1:[42 TO 45]" // tag=2 same as 1- ,+ "{!ex=2 key=foo}id_i1:[42 TO 45]", // tag=2 same as 1"facet.query",- "{!ex=3,4 key=bar}id_i1:[43 TO 47]" // tag=3,4 don't exist- ,+ "{!ex=3,4 key=bar}id_i1:[43 TO 47]", // tag=3,4 don't exist"facet.field",- "{!ex=3,1}trait_s" // 3,1 same as 1- ,+ "{!ex=3,1}trait_s", // 3,1 same as 1"fq","{!tag=1,2}id:47" // tagged as 1 and 2),@@ -1511,11 +1502,9 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {p,f,p + ".start",- "-0200-01-01T00:00:00Z" // BC- ,+ "-0200-01-01T00:00:00Z", // BCp + ".end",- "+0200-01-01T00:00:00Z" // AD- ,+ "+0200-01-01T00:00:00Z", // ADp + ".gap","+100YEARS",p + ".other",@@ -1571,9 +1560,8 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {p + ".other","all",p + ".include",- "lower")+ "lower"),// 15 days + pre+post+inner = 18- ,"*[count(" + pre + "/int)=15]",pre + "/int[@name='1976-07-01T00:00:00Z'][.='1' ]",pre + "/int[@name='1976-07-02T00:00:00Z'][.='0']",@@ -1589,9 +1577,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {pre + "/int[@name='1976-07-12T00:00:00Z'][.='0']",pre + "/int[@name='1976-07-13T00:00:00Z'][.='2' ]",pre + "/int[@name='1976-07-14T00:00:00Z'][.='0']",- pre + "/int[@name='1976-07-15T00:00:00Z'][.='1' ]"- //- ,+ pre + "/int[@name='1976-07-15T00:00:00Z'][.='1' ]",meta + "/int[@name='before' ][.='1']",meta + "/int[@name='after' ][.='1']",meta + "/int[@name='between'][.='8']");@@ -1616,9 +1602,8 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {p + ".other","all",p + ".include",- "upper")+ "upper"),// 15 days + pre+post+inner = 18- ,"*[count(" + pre + "/int)=15]",pre + "/int[@name='1976-07-01T00:00:00Z'][.='0']",pre + "/int[@name='1976-07-02T00:00:00Z'][.='0']",@@ -1634,9 +1619,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {pre + "/int[@name='1976-07-12T00:00:00Z'][.='1' ]",pre + "/int[@name='1976-07-13T00:00:00Z'][.='1' ]",pre + "/int[@name='1976-07-14T00:00:00Z'][.='0']",- pre + "/int[@name='1976-07-15T00:00:00Z'][.='1' ]"- //- ,+ pre + "/int[@name='1976-07-15T00:00:00Z'][.='1' ]",meta + "/int[@name='before' ][.='2']",meta + "/int[@name='after' ][.='1']",meta + "/int[@name='between'][.='7']");@@ -1663,9 +1646,8 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {p + ".include","lower",p + ".include",- "upper")+ "upper"),// 15 days + pre+post+inner = 18- ,"*[count(" + pre + "/int)=15]",pre + "/int[@name='1976-07-01T00:00:00Z'][.='1' ]",pre + "/int[@name='1976-07-02T00:00:00Z'][.='0']",@@ -1681,9 +1663,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {pre + "/int[@name='1976-07-12T00:00:00Z'][.='1' ]",pre + "/int[@name='1976-07-13T00:00:00Z'][.='2' ]",pre + "/int[@name='1976-07-14T00:00:00Z'][.='0']",- pre + "/int[@name='1976-07-15T00:00:00Z'][.='1' ]"- //- ,+ pre + "/int[@name='1976-07-15T00:00:00Z'][.='1' ]",meta + "/int[@name='before' ][.='1']",meta + "/int[@name='after' ][.='1']",meta + "/int[@name='between'][.='8']");@@ -1710,9 +1690,8 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {p + ".include","upper",p + ".include",- "edge")+ "edge"),// 15 days + pre+post+inner = 18- ,"*[count(" + pre + "/int)=15]",pre + "/int[@name='1976-07-01T00:00:00Z'][.='1' ]",pre + "/int[@name='1976-07-02T00:00:00Z'][.='0']",@@ -1728,9 +1707,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {pre + "/int[@name='1976-07-12T00:00:00Z'][.='1' ]",pre + "/int[@name='1976-07-13T00:00:00Z'][.='1' ]",pre + "/int[@name='1976-07-14T00:00:00Z'][.='0']",- pre + "/int[@name='1976-07-15T00:00:00Z'][.='1' ]"- //- ,+ pre + "/int[@name='1976-07-15T00:00:00Z'][.='1' ]",meta + "/int[@name='before' ][.='1']",meta + "/int[@name='after' ][.='1']",meta + "/int[@name='between'][.='8']");@@ -1749,8 +1726,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {p + ".start","1976-07-01T00:00:00.000Z",p + ".end",- "1976-07-13T00:00:00.000Z" // smaller now- ,+ "1976-07-13T00:00:00.000Z", // smaller nowp + ".gap","+1DAY",p + ".other",@@ -1758,9 +1734,8 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {p + ".include","upper",p + ".include",- "outer")+ "outer"),// 12 days + pre+post+inner = 15- ,"*[count(" + pre + "/int)=12]",pre + "/int[@name='1976-07-01T00:00:00Z'][.='0']",pre + "/int[@name='1976-07-02T00:00:00Z'][.='0']",@@ -1773,9 +1748,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {pre + "/int[@name='1976-07-09T00:00:00Z'][.='0']",pre + "/int[@name='1976-07-10T00:00:00Z'][.='0']",pre + "/int[@name='1976-07-11T00:00:00Z'][.='0']",- pre + "/int[@name='1976-07-12T00:00:00Z'][.='1' ]"- //- ,+ pre + "/int[@name='1976-07-12T00:00:00Z'][.='1' ]",meta + "/int[@name='before' ][.='2']",meta + "/int[@name='after' ][.='4']",meta + "/int[@name='between'][.='5']");@@ -1794,8 +1767,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {p + ".start","1976-07-01T00:00:00.000Z",p + ".end",- "1976-07-13T00:00:00.000Z" // smaller now- ,+ "1976-07-13T00:00:00.000Z", // smaller nowp + ".gap","+1DAY",p + ".other",@@ -1803,9 +1775,8 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {p + ".include","lower",p + ".include",- "edge")+ "edge"),// 12 days + pre+post+inner = 15- ,"*[count(" + pre + "/int)=12]",pre + "/int[@name='1976-07-01T00:00:00Z'][.='1' ]",pre + "/int[@name='1976-07-02T00:00:00Z'][.='0']",@@ -1818,9 +1789,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {pre + "/int[@name='1976-07-09T00:00:00Z'][.='0']",pre + "/int[@name='1976-07-10T00:00:00Z'][.='0']",pre + "/int[@name='1976-07-11T00:00:00Z'][.='0']",- pre + "/int[@name='1976-07-12T00:00:00Z'][.='1' ]"- //- ,+ pre + "/int[@name='1976-07-12T00:00:00Z'][.='1' ]",meta + "/int[@name='before' ][.='1']",meta + "/int[@name='after' ][.='3']",meta + "/int[@name='between'][.='6']");@@ -1839,8 +1808,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {p + ".start","1976-07-01T00:00:00.000Z",p + ".end",- "1976-07-13T00:00:00.000Z" // smaller now- ,+ "1976-07-13T00:00:00.000Z", // smaller nowp + ".gap","+1DAY",p + ".other",@@ -1848,9 +1816,8 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {p + ".include","lower",p + ".include",- "outer")+ "outer"),// 12 days + pre+post+inner = 15- ,"*[count(" + pre + "/int)=12]",pre + "/int[@name='1976-07-01T00:00:00Z'][.='1' ]",pre + "/int[@name='1976-07-02T00:00:00Z'][.='0']",@@ -1863,9 +1830,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {pre + "/int[@name='1976-07-09T00:00:00Z'][.='0']",pre + "/int[@name='1976-07-10T00:00:00Z'][.='0']",pre + "/int[@name='1976-07-11T00:00:00Z'][.='0']",- pre + "/int[@name='1976-07-12T00:00:00Z'][.='0']"- //- ,+ pre + "/int[@name='1976-07-12T00:00:00Z'][.='0']",meta + "/int[@name='before' ][.='2']",meta + "/int[@name='after' ][.='4']",meta + "/int[@name='between'][.='5']");@@ -1884,8 +1849,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {p + ".start","1976-07-01T00:00:00.000Z",p + ".end",- "1976-07-13T00:00:00.000Z" // smaller now- ,+ "1976-07-13T00:00:00.000Z", // smaller nowp + ".gap","+1DAY",p + ".other",@@ -1895,9 +1859,8 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {p + ".include","edge",p + ".include",- "outer")+ "outer"),// 12 days + pre+post+inner = 15- ,"*[count(" + pre + "/int)=12]",pre + "/int[@name='1976-07-01T00:00:00Z'][.='1' ]",pre + "/int[@name='1976-07-02T00:00:00Z'][.='0']",@@ -1910,9 +1873,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {pre + "/int[@name='1976-07-09T00:00:00Z'][.='0']",pre + "/int[@name='1976-07-10T00:00:00Z'][.='0']",pre + "/int[@name='1976-07-11T00:00:00Z'][.='0']",- pre + "/int[@name='1976-07-12T00:00:00Z'][.='1' ]"- //- ,+ pre + "/int[@name='1976-07-12T00:00:00Z'][.='1' ]",meta + "/int[@name='before' ][.='2']",meta + "/int[@name='after' ][.='4']",meta + "/int[@name='between'][.='6']");@@ -1931,16 +1892,14 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {p + ".start","1976-07-01T00:00:00.000Z",p + ".end",- "1976-07-13T00:00:00.000Z" // smaller now- ,+ "1976-07-13T00:00:00.000Z", // smaller nowp + ".gap","+1DAY",p + ".other","all",p + ".include",- "all")+ "all"),// 12 days + pre+post+inner = 15- ,"*[count(" + pre + "/int)=12]",pre + "/int[@name='1976-07-01T00:00:00Z'][.='1' ]",pre + "/int[@name='1976-07-02T00:00:00Z'][.='0']",@@ -1953,9 +1912,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {pre + "/int[@name='1976-07-09T00:00:00Z'][.='0']",pre + "/int[@name='1976-07-10T00:00:00Z'][.='0']",pre + "/int[@name='1976-07-11T00:00:00Z'][.='0']",- pre + "/int[@name='1976-07-12T00:00:00Z'][.='1' ]"- //- ,+ pre + "/int[@name='1976-07-12T00:00:00Z'][.='1' ]",meta + "/int[@name='before' ][.='2']",meta + "/int[@name='after' ][.='4']",meta + "/int[@name='between'][.='6']");@@ -1989,8 +1946,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {"facet","true","NOW",- "205078333000" // 1976-07-01T14:12:13.000Z- ,+ "205078333000", // 1976-07-01T14:12:13.000Z"TZ",TZ,p,@@ -2004,9 +1960,8 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {p + ".other","all",p + ".include",- "lower")+ "lower"),// 15 days + pre+post+inner = 18- ,"*[count(" + pre + "/int)=15]",pre + "/int[@name='1976-07-01T07:00:00Z'][.='0']",pre + "/int[@name='1976-07-02T07:00:00Z'][.='0']",@@ -2022,9 +1977,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {pre + "/int[@name='1976-07-12T07:00:00Z'][.='1' ]",pre + "/int[@name='1976-07-13T07:00:00Z'][.='1' ]",pre + "/int[@name='1976-07-14T07:00:00Z'][.='0']",- pre + "/int[@name='1976-07-15T07:00:00Z'][.='1' ]"- //- ,+ pre + "/int[@name='1976-07-15T07:00:00Z'][.='1' ]",meta + "/int[@name='before' ][.='2']",meta + "/int[@name='after' ][.='1']",meta + "/int[@name='between'][.='7']");@@ -2041,8 +1994,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {"facet","true","NOW",- "1288606136000" // 2010-11-01T10:08:56.235Z- ,+ "1288606136000", // 2010-11-01T10:08:56.235Z"TZ",TZ,p,@@ -2056,9 +2008,8 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {p + ".other","all",p + ".include",- "lower")+ "lower"),// 15 days + pre+post+inner = 18- ,"*[count(" + pre + "/int)=15]",pre + "/int[@name='2010-11-01T07:00:00Z'][.='0']",pre + "/int[@name='2010-11-02T07:00:00Z'][.='0']",@@ -2067,8 +2018,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {pre + "/int[@name='2010-11-05T07:00:00Z'][.='0']",pre + "/int[@name='2010-11-06T07:00:00Z'][.='0']",pre + "/int[@name='2010-11-07T07:00:00Z'][.='0']",- pre + "/int[@name='2010-11-08T08:00:00Z'][.='0']" // BOOM!- ,+ pre + "/int[@name='2010-11-08T08:00:00Z'][.='0']", // BOOM!pre + "/int[@name='2010-11-09T08:00:00Z'][.='0']",pre + "/int[@name='2010-11-10T08:00:00Z'][.='0']",pre + "/int[@name='2010-11-11T08:00:00Z'][.='0']",@@ -2144,9 +2094,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {"lower"),"*[count(" + pre + "/int)=3]",pre + "/int[@name='" + start + "'][.='6' ]",- pre + "/int[@name='" + mid + "'][.='0' ]"- //- ,+ pre + "/int[@name='" + mid + "'][.='0' ]",meta + "/double[@name='end' ][.='" + end + "']",meta + "/int[@name='before' ][.='0']",meta + "/int[@name='after' ][.='0']",@@ -2181,9 +2129,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {pre + "/int[@name='10.0'][.='1' ]",pre + "/int[@name='20.0'][.='3' ]",pre + "/int[@name='30.0'][.='2' ]",- pre + "/int[@name='40.0'][.='0' ]"- //- ,+ pre + "/int[@name='40.0'][.='0' ]",meta + "/int[@name='before' ][.='0']",meta + "/int[@name='after' ][.='0']",meta + "/int[@name='between'][.='6']");@@ -2205,9 +2151,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {pre + "/int[@name='10.0'][.='2' ]",pre + "/int[@name='20.0'][.='3' ]",pre + "/int[@name='30.0'][.='1' ]",- pre + "/int[@name='40.0'][.='0' ]"- //- ,+ pre + "/int[@name='40.0'][.='0' ]",meta + "/int[@name='before' ][.='0']",meta + "/int[@name='after' ][.='0']",meta + "/int[@name='between'][.='6']");@@ -2230,9 +2174,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {pre + "/int[@name='10.0'][.='2' ]",pre + "/int[@name='20.0'][.='4' ]",pre + "/int[@name='30.0'][.='2' ]",- pre + "/int[@name='40.0'][.='0' ]"- //- ,+ pre + "/int[@name='40.0'][.='0' ]",meta + "/int[@name='before' ][.='0']",meta + "/int[@name='after' ][.='0']",meta + "/int[@name='between'][.='6']");@@ -2254,9 +2196,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {"*[count(" + pre + "/int)=3]",pre + "/int[@name='20.0'][.='4' ]",pre + "/int[@name='30.0'][.='1' ]",- pre + "/int[@name='40.0'][.='0' ]"- //- ,+ pre + "/int[@name='40.0'][.='0' ]",meta + "/int[@name='before' ][.='1']",meta + "/int[@name='after' ][.='0']",meta + "/int[@name='between'][.='5']");@@ -2277,9 +2217,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {"facet.range.include", "outer"),"*[count(" + pre + "/int)=2]",pre + "/int[@name='10.0'][.='2' ]",- pre + "/int[@name='20.0'][.='3' ]"- //- ,+ pre + "/int[@name='20.0'][.='3' ]",meta + "/int[@name='before' ][.='0']",meta + "/int[@name='after' ][.='2']",meta + "/int[@name='between'][.='5']");@@ -2300,9 +2238,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {"facet.range.include", "edge"),"*[count(" + pre + "/int)=2]",pre + "/int[@name='10.0'][.='1' ]",- pre + "/int[@name='20.0'][.='4' ]"- //- ,+ pre + "/int[@name='20.0'][.='4' ]",meta + "/int[@name='before' ][.='0']",meta + "/int[@name='after' ][.='1']",meta + "/int[@name='between'][.='5']");@@ -2323,9 +2259,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {"facet.range.include", "outer"),"*[count(" + pre + "/int)=2]",pre + "/int[@name='20.0'][.='3' ]",- pre + "/int[@name='30.0'][.='2' ]"- //- ,+ pre + "/int[@name='30.0'][.='2' ]",meta + "/int[@name='before' ][.='2']",meta + "/int[@name='after' ][.='0']",meta + "/int[@name='between'][.='5']");@@ -2348,9 +2282,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {"facet.range.include", "outer"),"*[count(" + pre + "/int)=2]",pre + "/int[@name='20.0'][.='3' ]",- pre + "/int[@name='30.0'][.='2' ]"- //- ,+ pre + "/int[@name='30.0'][.='2' ]",meta + "/int[@name='before' ][.='2']",meta + "/int[@name='after' ][.='1']",meta + "/int[@name='between'][.='5']");@@ -2371,9 +2303,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {"facet.range.include", "all"),"*[count(" + pre + "/int)=2]",pre + "/int[@name='20.0'][.='4' ]",- pre + "/int[@name='30.0'][.='2' ]"- //- ,+ pre + "/int[@name='30.0'][.='2' ]",meta + "/int[@name='before' ][.='2']",meta + "/int[@name='after' ][.='1']",meta + "/int[@name='between'][.='5']");@@ -2445,9 +2375,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {"lower"),"*[count(" + pre + "/int)=3]",pre + "/int[@name='" + start + "'][.='6' ]",- pre + "/int[@name='" + mid + "'][.='0' ]"- //- ,+ pre + "/int[@name='" + mid + "'][.='0' ]",meta + "/long[@name='end' ][.='" + end + "']",meta + "/int[@name='before' ][.='0']",meta + "/int[@name='after' ][.='0']",@@ -2483,9 +2411,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {"*[count(" + pre + "/int)=3]",pre + "/int[@name='35'][.='0' ]",pre + "/int[@name='40'][.='3' ]",- pre + "/int[@name='45'][.='3' ]"- //- ,+ pre + "/int[@name='45'][.='3' ]",meta + "/int[@name='before' ][.='0']",meta + "/int[@name='after' ][.='0']",meta + "/int[@name='between'][.='6']");@@ -2506,9 +2432,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {"*[count(" + pre + "/int)=3]",pre + "/int[@name='35'][.='0' ]",pre + "/int[@name='40'][.='4' ]",- pre + "/int[@name='45'][.='2' ]"- //- ,+ pre + "/int[@name='45'][.='2' ]",meta + "/int[@name='before' ][.='0']",meta + "/int[@name='after' ][.='0']",meta + "/int[@name='between'][.='6']");diff --git a/solr/core/src/test/org/apache/solr/request/TestFaceting.java b/solr/core/src/test/org/apache/solr/request/TestFaceting.javaindex 2021aaab01c..b2f632bfef1 100644--- a/solr/core/src/test/org/apache/solr/request/TestFaceting.java+++ b/solr/core/src/test/org/apache/solr/request/TestFaceting.java@@ -628,20 +628,17 @@ public class TestFaceting extends SolrTestCaseJ4 {"facet.field","{!key=foo " + "facet.sort=index" + "}" + fname,"facet.field",- "{!key=bar " + "facet.missing=true" + "}" + fname)+ "{!key=bar " + "facet.missing=true" + "}" + fname),// foo is in index order w/o missing- ,"*[count(//lst[@name='foo']/int)=4]","//lst[@name='foo']/int[1][@name='Chauvinist'][.='1']","//lst[@name='foo']/int[2][@name='Obnoxious'][.='1']","//lst[@name='foo']/int[3][@name='Pig'][.='0']",- "//lst[@name='foo']/int[4][@name='Tool'][.='2']"+ "//lst[@name='foo']/int[4][@name='Tool'][.='2']",// bar is in count order by default and includes missing- ,"*[count(//lst[@name='bar']/int)=5]",- "//lst[@name='bar']/int[1][@name='Tool'][.='2']"+ "//lst[@name='bar']/int[1][@name='Tool'][.='2']",// don't assume tie breaker for slots 3 & 4, behavior undefined?- ,"//lst[@name='bar']/int[4][@name='Pig'][.='0']","//lst[@name='bar']/int[5][not(@name)][.='1']");@@ -660,17 +657,14 @@ public class TestFaceting extends SolrTestCaseJ4 {"facet.field","{!key=foo " + "facet.mincount=2" + "}" + fname,"facet.field",- "{!key=bar}" + fname)+ "{!key=bar}" + fname),// only Tool for foo- ,"*[count(//lst[@name='foo']/int)=1]",- "//lst[@name='foo']/int[1][@name='Tool'][.='2']"+ "//lst[@name='foo']/int[1][@name='Tool'][.='2']",// all for bar- ,"*[count(//lst[@name='bar']/int)=4]",- "//lst[@name='bar']/int[1][@name='Tool'][.='2']"+ "//lst[@name='bar']/int[1][@name='Tool'][.='2']",// don't assume tie breaker for slots 3 & 4, behavior undefined?- ,"//lst[@name='bar']/int[4][@name='Pig'][.='0']");assertQ(@@ -688,21 +682,17 @@ public class TestFaceting extends SolrTestCaseJ4 {"facet.field","{!key=foo " + "facet.missing=true" + "}" + fname,"facet.field",- "{!key=bar}" + fname)+ "{!key=bar}" + fname),// foo includes missing- ,"*[count(//lst[@name='foo']/int)=5]",- "//lst[@name='foo']/int[1][@name='Tool'][.='2']"+ "//lst[@name='foo']/int[1][@name='Tool'][.='2']",// don't assume tie breaker for slots 3 & 4, behavior undefined?- ,"//lst[@name='foo']/int[4][@name='Pig'][.='0']",- "//lst[@name='foo']/int[5][not(@name)][.='1']"+ "//lst[@name='foo']/int[5][not(@name)][.='1']",// bar does not- ,"*[count(//lst[@name='bar']/int)=4]",- "//lst[@name='bar']/int[1][@name='Tool'][.='2']"+ "//lst[@name='bar']/int[1][@name='Tool'][.='2']",// don't assume tie breaker for slots 3 & 4, behavior undefined?- ,"//lst[@name='bar']/int[4][@name='Pig'][.='0']");assertQforUIF(diff --git a/solr/core/src/test/org/apache/solr/response/transform/TestSubQueryTransformer.java b/solr/core/src/test/org/apache/solr/response/transform/TestSubQueryTransformer.javaindex 5d9af928c45..c7ff7c01d16 100644--- a/solr/core/src/test/org/apache/solr/response/transform/TestSubQueryTransformer.java+++ b/solr/core/src/test/org/apache/solr/response/transform/TestSubQueryTransformer.java@@ -490,11 +490,8 @@ public class TestSubQueryTransformer extends SolrTestCaseJ4 {"" + peopleMultiplier * 3},"subq1.neighbours.sort",- "id desc") // ,- ,- asserts.toArray(new String[] {})- // )- );+ "id desc"),+ asserts.toArray(new String[] {}));}@Testdiff --git a/solr/core/src/test/org/apache/solr/schema/CurrencyFieldTypeTest.java b/solr/core/src/test/org/apache/solr/schema/CurrencyFieldTypeTest.javaindex 2f04c33436d..fa711929403 100644--- a/solr/core/src/test/org/apache/solr/schema/CurrencyFieldTypeTest.java+++ b/solr/core/src/test/org/apache/solr/schema/CurrencyFieldTypeTest.java@@ -711,10 +711,8 @@ public class CurrencyFieldTypeTest extends SolrTestCaseJ4 {"//lst[@name='xxx']/lst[@name='between']/long[@name='count'][.='2']");// GBP has a symetric echange rate with USD, so these counts are *similar* to the USD based- // request above...- // but the asymetric EUR/USD rate means that when computing counts realtive to GBP the EUR based- // docs wind up in- // diff buckets+ // request above... but the asymetric EUR/USD rate means that when computing counts realtive to+ // GBP the EUR based docs wind up in diff bucketsassertQ("Ensure that we get correct facet counts back in GBP (facet.range)",req(diff --git a/solr/core/src/test/org/apache/solr/schema/TestSortableTextField.java b/solr/core/src/test/org/apache/solr/schema/TestSortableTextField.javaindex 30988c167b1..2089275003c 100644--- a/solr/core/src/test/org/apache/solr/schema/TestSortableTextField.java+++ b/solr/core/src/test/org/apache/solr/schema/TestSortableTextField.java@@ -352,16 +352,14 @@ public class TestSortableTextField extends SolrTestCaseJ4 {for (String dir : Arrays.asList("asc", "desc")) {// for max3, dir shouldn't matter - should always tie..assertQ(- req("q", "*:*", "sort", "whitespace_max3_stxt " + dir + ", id desc") // max3, id desc- ,+ req("q", "*:*", "sort", "whitespace_max3_stxt " + dir + ", id desc"), // max3, id desc"//*[@numFound='4']","//result/doc[1]/str[@name='id'][.=4]","//result/doc[2]/str[@name='id'][.=3]","//result/doc[3]/str[@name='id'][.=2]","//result/doc[4]/str[@name='id'][.=1]");assertQ(- req("q", "*:*", "sort", "whitespace_max3_stxt " + dir + ", id asc") // max3, id desc- ,+ req("q", "*:*", "sort", "whitespace_max3_stxt " + dir + ", id asc"), // max3, id desc"//*[@numFound='4']","//result/doc[1]/str[@name='id'][.=1]","//result/doc[2]/str[@name='id'][.=2]",@@ -369,26 +367,21 @@ public class TestSortableTextField extends SolrTestCaseJ4 {"//result/doc[4]/str[@name='id'][.=4]");}assertQ(- req("q", "*:*", "sort", "whitespace_max6_stxt asc, id desc") // max6 asc, id desc- ,+ req("q", "*:*", "sort", "whitespace_max6_stxt asc, id desc"), // max6 asc, id desc"//*[@numFound='4']",- "//result/doc[1]/str[@name='id'][.=4]" // no tiebreaker needed- ,+ "//result/doc[1]/str[@name='id'][.=4]", // no tiebreaker needed"//result/doc[2]/str[@name='id'][.=3]","//result/doc[3]/str[@name='id'][.=2]","//result/doc[4]/str[@name='id'][.=1]");assertQ(- req("q", "*:*", "sort", "whitespace_max6_stxt asc, id asc") // max6 asc, id desc- ,+ req("q", "*:*", "sort", "whitespace_max6_stxt asc, id asc"), // max6 asc, id desc"//*[@numFound='4']",- "//result/doc[1]/str[@name='id'][.=4]" // no tiebreaker needed- ,+ "//result/doc[1]/str[@name='id'][.=4]", // no tiebreaker needed"//result/doc[2]/str[@name='id'][.=1]","//result/doc[3]/str[@name='id'][.=2]","//result/doc[4]/str[@name='id'][.=3]");assertQ(- req("q", "*:*", "sort", "whitespace_max6_stxt desc, id desc") // max6 desc, id desc- ,+ req("q", "*:*", "sort", "whitespace_max6_stxt desc, id desc"), // max6 desc, id desc"//*[@numFound='4']","//result/doc[1]/str[@name='id'][.=3]","//result/doc[2]/str[@name='id'][.=2]",@@ -396,8 +389,7 @@ public class TestSortableTextField extends SolrTestCaseJ4 {"//result/doc[4]/str[@name='id'][.=4]" // no tiebreaker needed);assertQ(- req("q", "*:*", "sort", "whitespace_max6_stxt desc, id asc") // max6 desc, id desc- ,+ req("q", "*:*", "sort", "whitespace_max6_stxt desc, id asc"), // max6 desc, id desc"//*[@numFound='4']","//result/doc[1]/str[@name='id'][.=1]","//result/doc[2]/str[@name='id'][.=2]",diff --git a/solr/core/src/test/org/apache/solr/schema/TestUseDocValuesAsStored.java b/solr/core/src/test/org/apache/solr/schema/TestUseDocValuesAsStored.javaindex 5bd49aafe8b..73103e8e3cf 100644--- a/solr/core/src/test/org/apache/solr/schema/TestUseDocValuesAsStored.java+++ b/solr/core/src/test/org/apache/solr/schema/TestUseDocValuesAsStored.java@@ -516,8 +516,7 @@ public class TestUseDocValuesAsStored extends AbstractBadConfigTestBase {"/response/docs/[0]/test_mvt_dvt_st_str/[2]==bbbb");// Currently, this test fails since stored=false. When SOLR-8740 is committed, it should not- // throw an exception- // and should succeed, returning the field in sorted order.+ // throw an exception and should succeed, returning the field in sorted order.try {assertJQ(req("q", "id:2", "fl", "test_mvt_dvt_sf_str"),diff --git a/solr/core/src/test/org/apache/solr/search/TestBlockCollapse.java b/solr/core/src/test/org/apache/solr/search/TestBlockCollapse.javaindex 7548b527304..23295676dc8 100644--- a/solr/core/src/test/org/apache/solr/search/TestBlockCollapse.java+++ b/solr/core/src/test/org/apache/solr/search/TestBlockCollapse.java@@ -557,10 +557,8 @@ public class TestBlockCollapse extends SolrTestCaseJ4 {"fl", "id","sort", "num_i asc"),"*[count(//doc)=3]",- "//result/doc[1][str[@name='id'][.='p2s4']]" // 13- ,- "//result/doc[2][str[@name='id'][.='p3s1']]" // 15- ,+ "//result/doc[1][str[@name='id'][.='p2s4']]", // 13+ "//result/doc[2][str[@name='id'][.='p3s1']]", // 15"//result/doc[3][str[@name='id'][.='p1s3']]" // 777);// same query, but boosting multiple skus from p3@@ -575,16 +573,12 @@ public class TestBlockCollapse extends SolrTestCaseJ4 {"fl", "id","sort", "num_i asc"),"*[count(//doc)=4]",- "//result/doc[1][str[@name='id'][.='p2s4']]" // 13- ,- "//result/doc[2][str[@name='id'][.='p3s2']]" // 100 (boosted so treated as own- // group)- ,- "//result/doc[3][str[@name='id'][.='p1s3']]" // 777- ,- "//result/doc[4][str[@name='id'][.='p3s3']]" // 1234 (boosted so treated as own- // group)- );+ "//result/doc[1][str[@name='id'][.='p2s4']]", // 13+ // 100 (boosted so treated as own group)+ "//result/doc[2][str[@name='id'][.='p3s2']]",+ "//result/doc[3][str[@name='id'][.='p1s3']]", // 777+ // 1234 (boosted so treated as own group)+ "//result/doc[4][str[@name='id'][.='p3s3']]");// same query, w/forceElevation to change top level orderassertQ(req(@@ -596,14 +590,11 @@ public class TestBlockCollapse extends SolrTestCaseJ4 {"fl", "id","sort", "num_i asc"),"*[count(//doc)=4]",- "//result/doc[1][str[@name='id'][.='p3s3']]" // 1234 (boosted so treated as own- // group)- ,- "//result/doc[2][str[@name='id'][.='p3s2']]" // 100 (boosted so treated as own- // group)- ,- "//result/doc[3][str[@name='id'][.='p2s4']]" // 13- ,+ // 1234 (boosted so treated as own group)+ "//result/doc[1][str[@name='id'][.='p3s3']]",+ // 100 (boosted so treated as own group)+ "//result/doc[2][str[@name='id'][.='p3s2']]",+ "//result/doc[3][str[@name='id'][.='p2s4']]", // 13"//result/doc[4][str[@name='id'][.='p1s3']]" // 777);}@@ -900,10 +891,8 @@ public class TestBlockCollapse extends SolrTestCaseJ4 {"//result/doc[1][str[@name='id'][.='z1']]","//result/doc[2][str[@name='id'][.='z2']]","//result/doc[3][str[@name='id'][.='z3']]",- "//result/doc[4][str[@name='id'][.='p2s4']]" // 13- ,- "//result/doc[5][str[@name='id'][.='p3s1']]" // 15- ,+ "//result/doc[4][str[@name='id'][.='p2s4']]", // 13+ "//result/doc[5][str[@name='id'][.='p3s1']]", // 15"//result/doc[6][str[@name='id'][.='z100']]","//result/doc[7][str[@name='id'][.='p1s3']]" // 777);@@ -922,13 +911,10 @@ public class TestBlockCollapse extends SolrTestCaseJ4 {"//result/doc[1][str[@name='id'][.='z1']]","//result/doc[2][str[@name='id'][.='z2']]","//result/doc[3][str[@name='id'][.='z3']]",- "//result/doc[4][str[@name='id'][.='p3s4']]" // 4- ,- "//result/doc[5][str[@name='id'][.='p2s4']]" // 13- ,+ "//result/doc[4][str[@name='id'][.='p3s4']]", // 4+ "//result/doc[5][str[@name='id'][.='p2s4']]", // 13"//result/doc[6][str[@name='id'][.='z100']]",- "//result/doc[7][str[@name='id'][.='p1s3']]" // 777- ,+ "//result/doc[7][str[@name='id'][.='p1s3']]", // 777"//result/doc[8][str[@name='id'][.='p3s3']]" // 1234);// same query, w/forceElevation to change top level order@@ -942,15 +928,12 @@ public class TestBlockCollapse extends SolrTestCaseJ4 {"fl", "id","sort", "num_i asc"),"*[count(//doc)=8]",- "//result/doc[1][str[@name='id'][.='p3s3']]" // 1234- ,+ "//result/doc[1][str[@name='id'][.='p3s3']]", // 1234"//result/doc[2][str[@name='id'][.='z3']]",- "//result/doc[3][str[@name='id'][.='p3s4']]" // 4- ,+ "//result/doc[3][str[@name='id'][.='p3s4']]", // 4"//result/doc[4][str[@name='id'][.='z1']]","//result/doc[5][str[@name='id'][.='z2']]",- "//result/doc[6][str[@name='id'][.='p2s4']]" // 13- ,+ "//result/doc[6][str[@name='id'][.='p2s4']]", // 13"//result/doc[7][str[@name='id'][.='z100']]","//result/doc[8][str[@name='id'][.='p1s3']]" // 777);@@ -971,8 +954,7 @@ public class TestBlockCollapse extends SolrTestCaseJ4 {public void testBlockCollapseWithExpandComponent() throws Exception {{ // convert our docs + some docs w/o collapse fields, along with some commits, to update- // commands- // in a shuffled order and process all of them...+ // commands in a shuffled order and process all of them...final List<String> updates =Stream.concat(Stream.of(commit(), commit()),@@ -1027,23 +1009,15 @@ public class TestBlockCollapse extends SolrTestCaseJ4 {"*[count(/response/result/doc)=3]","/response/result/doc[1]/str[@name='id'][.='p1s1']","/response/result/doc[2]/str[@name='id'][.='p2s4']",- "/response/result/doc[3]/str[@name='id'][.='p3s1']"- //- ,- "*[count(" + EX + ")=count(/response/result/doc)]" // group per doc- //- ,+ "/response/result/doc[3]/str[@name='id'][.='p3s1']",+ "*[count(" + EX + ")=count(/response/result/doc)]", // group per doc"*[count(" + EX + "[@name='-1']/doc)=3]",EX + "[@name='-1']/doc[1]/str[@name='id'][.='p1s3']",EX + "[@name='-1']/doc[2]/str[@name='id'][.='p1s4']",- EX + "[@name='-1']/doc[3]/str[@name='id'][.='p1s2']"- //- ,+ EX + "[@name='-1']/doc[3]/str[@name='id'][.='p1s2']","*[count(" + EX + "[@name='0']/doc)=2]",EX + "[@name='0']/doc[1]/str[@name='id'][.='p2s3']",- EX + "[@name='0']/doc[2]/str[@name='id'][.='p2s1']"- //- ,+ EX + "[@name='0']/doc[2]/str[@name='id'][.='p2s1']","*[count(" + EX + "[@name='1']/doc)=2]",EX + "[@name='1']/doc[1]/str[@name='id'][.='p3s4']",EX + "[@name='1']/doc[2]/str[@name='id'][.='p3s3']");@@ -1072,19 +1046,13 @@ public class TestBlockCollapse extends SolrTestCaseJ4 {"/response/result/doc[2][str[@name='id'][.='p1s2'] and float[@name='score'][.=52.0]]","/response/result/doc[3][str[@name='id'][.='p3s4'] and float[@name='score'][.=46.0]]","/response/result/doc[4][str[@name='id'][.='z3'] and float[@name='score'][.=45.0]]",- "/response/result/doc[5][str[@name='id'][.='z2'] and float[@name='score'][.=44.0]]"- //- ,- "*[count(" + EX + ")=2]" // groups w/o any other docs don't expand- //- ,+ "/response/result/doc[5][str[@name='id'][.='z2'] and float[@name='score'][.=44.0]]",+ "*[count(" + EX + ")=2]", // groups w/o any other docs don't expand"*[count(" + EX + "[@name='-1']/doc)=1]",- EX + "[@name='-1']/doc[1][str[@name='id'][.='p1s4'] and float[@name='score'][.=48.0]]"- //- ,+ EX+ + "[@name='-1']/doc[1][str[@name='id'][.='p1s4'] and float[@name='score'][.=48.0]]","*[count(" + EX + "[@name='0']/doc)=1]",EX + "[@name='0']/doc[1][str[@name='id'][.='p2s2'] and float[@name='score'][.=52.0]]"- //// no "expand" docs for group '1' because no other docs match query// no "expand" docs for nulls unless/until SOLR-14330 is implemented);diff --git a/solr/core/src/test/org/apache/solr/search/TestCollapseQParserPlugin.java b/solr/core/src/test/org/apache/solr/search/TestCollapseQParserPlugin.javaindex 289b74a7877..97088ec08fa 100644--- a/solr/core/src/test/org/apache/solr/search/TestCollapseQParserPlugin.java+++ b/solr/core/src/test/org/apache/solr/search/TestCollapseQParserPlugin.java@@ -837,10 +837,9 @@ public class TestCollapseQParserPlugin extends SolrTestCaseJ4 {assertQ(req(params),"*[count(//doc)=2]",- // since selector is bogus, group head is undefined- // (should be index order, but don't make absolute assumptions: segments may be- // re-ordered)- // key assertion is that there is one doc from each group & groups are in order+ // since selector is bogus, group head is undefined (should be index order, but don't make+ // absolute assumptions: segments may be re-ordered) key assertion is that there is one+ // doc from each group & groups are in order"//result/doc[1]/*[@name='" + group + "'][starts-with(.,'1')]","//result/doc[2]/*[@name='" + group + "'][starts-with(.,'2')]");}@@ -1385,10 +1384,8 @@ public class TestCollapseQParserPlugin extends SolrTestCaseJ4 {"fq","{!collapse field=" + f + " nullPolicy=ignore " + selector + "}")),"*[count(//doc)=3]",- "//result/doc[1]/str[@name='id'][.='9']" // group C- ,- "//result/doc[2]/str[@name='id'][.='8']" // group A- ,+ "//result/doc[1]/str[@name='id'][.='9']", // group C+ "//result/doc[2]/str[@name='id'][.='8']", // group A"//result/doc[3]/str[@name='id'][.='3']" // group B);assertQ(@@ -1403,12 +1400,9 @@ public class TestCollapseQParserPlugin extends SolrTestCaseJ4 {"fq","{!collapse field=" + f + " nullPolicy=ignore " + selector + "}")),"*[count(//doc)=4]",- "//result/doc[1]/str[@name='id'][.='1']" // elevated, prevents group A- ,- "//result/doc[2]/str[@name='id'][.='5']" // elevated, (also) prevents group A- ,- "//result/doc[3]/str[@name='id'][.='9']" // group C- ,+ "//result/doc[1]/str[@name='id'][.='1']", // elevated, prevents group A+ "//result/doc[2]/str[@name='id'][.='5']", // elevated, (also) prevents group A+ "//result/doc[3]/str[@name='id'][.='9']", // group C"//result/doc[4]/str[@name='id'][.='3']" // group B);assertQ(@@ -1423,14 +1417,10 @@ public class TestCollapseQParserPlugin extends SolrTestCaseJ4 {"fq","{!collapse field=" + f + " nullPolicy=ignore " + selector + "}")),"*[count(//doc)=5]",- "//result/doc[1]/str[@name='id'][.='0']" // elevated (null)- ,- "//result/doc[2]/str[@name='id'][.='7']" // elevated (null)- ,- "//result/doc[3]/str[@name='id'][.='9']" // group C- ,- "//result/doc[4]/str[@name='id'][.='8']" // group A- ,+ "//result/doc[1]/str[@name='id'][.='0']", // elevated (null)+ "//result/doc[2]/str[@name='id'][.='7']", // elevated (null)+ "//result/doc[3]/str[@name='id'][.='9']", // group C+ "//result/doc[4]/str[@name='id'][.='8']", // group A"//result/doc[5]/str[@name='id'][.='3']" // group B);assertQ(@@ -1445,12 +1435,9 @@ public class TestCollapseQParserPlugin extends SolrTestCaseJ4 {"fq","{!collapse field=" + f + " nullPolicy=ignore " + selector + "}")),"*[count(//doc)=4]",- "//result/doc[1]/str[@name='id'][.='6']" // elevated, prevents group C- ,- "//result/doc[2]/str[@name='id'][.='0']" // elevated (null)- ,- "//result/doc[3]/str[@name='id'][.='8']" // group A- ,+ "//result/doc[1]/str[@name='id'][.='6']", // elevated, prevents group C+ "//result/doc[2]/str[@name='id'][.='0']", // elevated (null)+ "//result/doc[3]/str[@name='id'][.='8']", // group A"//result/doc[4]/str[@name='id'][.='3']" // group B);@@ -1463,12 +1450,9 @@ public class TestCollapseQParserPlugin extends SolrTestCaseJ4 {"fq","{!collapse field=" + f + " nullPolicy=collapse " + selector + "}")),"*[count(//doc)=4]",- "//result/doc[1]/str[@name='id'][.='9']" // group C- ,- "//result/doc[2]/str[@name='id'][.='8']" // group A- ,- "//result/doc[3]/str[@name='id'][.='7']" // group null- ,+ "//result/doc[1]/str[@name='id'][.='9']", // group C+ "//result/doc[2]/str[@name='id'][.='8']", // group A+ "//result/doc[3]/str[@name='id'][.='7']", // group null"//result/doc[4]/str[@name='id'][.='3']" // group B);assertQ(@@ -1483,14 +1467,10 @@ public class TestCollapseQParserPlugin extends SolrTestCaseJ4 {"fq","{!collapse field=" + f + " nullPolicy=collapse " + selector + "}")),"*[count(//doc)=5]",- "//result/doc[1]/str[@name='id'][.='1']" // elevated, prevents group A- ,- "//result/doc[2]/str[@name='id'][.='5']" // elevated, (also) prevents group A- ,- "//result/doc[3]/str[@name='id'][.='9']" // group C- ,- "//result/doc[4]/str[@name='id'][.='7']" // group null- ,+ "//result/doc[1]/str[@name='id'][.='1']", // elevated, prevents group A+ "//result/doc[2]/str[@name='id'][.='5']", // elevated, (also) prevents group A+ "//result/doc[3]/str[@name='id'][.='9']", // group C+ "//result/doc[4]/str[@name='id'][.='7']", // group null"//result/doc[5]/str[@name='id'][.='3']" // group B);assertQ(@@ -1505,14 +1485,10 @@ public class TestCollapseQParserPlugin extends SolrTestCaseJ4 {"fq","{!collapse field=" + f + " nullPolicy=collapse " + selector + "}")),"*[count(//doc)=5]",- "//result/doc[1]/str[@name='id'][.='0']" // elevated (null)- ,- "//result/doc[2]/str[@name='id'][.='7']" // elevated (null)- ,- "//result/doc[3]/str[@name='id'][.='9']" // group C- ,- "//result/doc[4]/str[@name='id'][.='8']" // group A- ,+ "//result/doc[1]/str[@name='id'][.='0']", // elevated (null)+ "//result/doc[2]/str[@name='id'][.='7']", // elevated (null)+ "//result/doc[3]/str[@name='id'][.='9']", // group C+ "//result/doc[4]/str[@name='id'][.='8']", // group A"//result/doc[5]/str[@name='id'][.='3']" // group B);assertQ(@@ -1527,12 +1503,9 @@ public class TestCollapseQParserPlugin extends SolrTestCaseJ4 {"fq","{!collapse field=" + f + " nullPolicy=collapse " + selector + "}")),"*[count(//doc)=4]",- "//result/doc[1]/str[@name='id'][.='6']" // elevated, prevents group C- ,- "//result/doc[2]/str[@name='id'][.='0']" // elevated (null)- ,- "//result/doc[3]/str[@name='id'][.='8']" // group A- ,+ "//result/doc[1]/str[@name='id'][.='6']", // elevated, prevents group C+ "//result/doc[2]/str[@name='id'][.='0']", // elevated (null)+ "//result/doc[3]/str[@name='id'][.='8']", // group A"//result/doc[4]/str[@name='id'][.='3']" // group B);@@ -1545,16 +1518,11 @@ public class TestCollapseQParserPlugin extends SolrTestCaseJ4 {"fq","{!collapse field=" + f + " nullPolicy=expand " + selector + "}")),"*[count(//doc)=6]",- "//result/doc[1]/str[@name='id'][.='9']" // group C- ,- "//result/doc[2]/str[@name='id'][.='8']" // group A- ,- "//result/doc[3]/str[@name='id'][.='7']" // null- ,- "//result/doc[4]/str[@name='id'][.='4']" // null- ,- "//result/doc[5]/str[@name='id'][.='3']" // group B- ,+ "//result/doc[1]/str[@name='id'][.='9']", // group C+ "//result/doc[2]/str[@name='id'][.='8']", // group A+ "//result/doc[3]/str[@name='id'][.='7']", // null+ "//result/doc[4]/str[@name='id'][.='4']", // null+ "//result/doc[5]/str[@name='id'][.='3']", // group B"//result/doc[6]/str[@name='id'][.='0']" // null);assertQ(@@ -1569,18 +1537,12 @@ public class TestCollapseQParserPlugin extends SolrTestCaseJ4 {"fq","{!collapse field=" + f + " nullPolicy=expand " + selector + "}")),"*[count(//doc)=7]",- "//result/doc[1]/str[@name='id'][.='1']" // elevated, prevents group A- ,- "//result/doc[2]/str[@name='id'][.='5']" // elevated, (also) prevents group A- ,- "//result/doc[3]/str[@name='id'][.='9']" // group C- ,- "//result/doc[4]/str[@name='id'][.='7']" // null- ,- "//result/doc[5]/str[@name='id'][.='4']" // null- ,- "//result/doc[6]/str[@name='id'][.='3']" // group B- ,+ "//result/doc[1]/str[@name='id'][.='1']", // elevated, prevents group A+ "//result/doc[2]/str[@name='id'][.='5']", // elevated, (also) prevents group A+ "//result/doc[3]/str[@name='id'][.='9']", // group C+ "//result/doc[4]/str[@name='id'][.='7']", // null+ "//result/doc[5]/str[@name='id'][.='4']", // null+ "//result/doc[6]/str[@name='id'][.='3']", // group B"//result/doc[7]/str[@name='id'][.='0']" // null);assertQ(@@ -1595,16 +1557,11 @@ public class TestCollapseQParserPlugin extends SolrTestCaseJ4 {"fq","{!collapse field=" + f + " nullPolicy=expand " + selector + "}")),"*[count(//doc)=6]",- "//result/doc[1]/str[@name='id'][.='0']" // elevated (null)- ,- "//result/doc[2]/str[@name='id'][.='7']" // elevated (null)- ,- "//result/doc[3]/str[@name='id'][.='9']" // group C- ,- "//result/doc[4]/str[@name='id'][.='8']" // group A- ,- "//result/doc[5]/str[@name='id'][.='4']" // null- ,+ "//result/doc[1]/str[@name='id'][.='0']", // elevated (null)+ "//result/doc[2]/str[@name='id'][.='7']", // elevated (null)+ "//result/doc[3]/str[@name='id'][.='9']", // group C+ "//result/doc[4]/str[@name='id'][.='8']", // group A+ "//result/doc[5]/str[@name='id'][.='4']", // null"//result/doc[6]/str[@name='id'][.='3']" // group B);assertQ(@@ -1619,16 +1576,11 @@ public class TestCollapseQParserPlugin extends SolrTestCaseJ4 {"fq","{!collapse field=" + f + " nullPolicy=expand " + selector + "}")),"*[count(//doc)=6]",- "//result/doc[1]/str[@name='id'][.='6']" // elevated, prevents group C- ,- "//result/doc[2]/str[@name='id'][.='0']" // elevated (null)- ,- "//result/doc[3]/str[@name='id'][.='8']" // group A- ,- "//result/doc[4]/str[@name='id'][.='7']" // null- ,- "//result/doc[5]/str[@name='id'][.='4']" // null- ,+ "//result/doc[1]/str[@name='id'][.='6']", // elevated, prevents group C+ "//result/doc[2]/str[@name='id'][.='0']", // elevated (null)+ "//result/doc[3]/str[@name='id'][.='8']", // group A+ "//result/doc[4]/str[@name='id'][.='7']", // null+ "//result/doc[5]/str[@name='id'][.='4']", // null"//result/doc[6]/str[@name='id'][.='3']" // group B);}diff --git a/solr/core/src/test/org/apache/solr/search/TestCustomSort.java b/solr/core/src/test/org/apache/solr/search/TestCustomSort.javaindex 9aace572750..c1f01bd02d6 100644--- a/solr/core/src/test/org/apache/solr/search/TestCustomSort.java+++ b/solr/core/src/test/org/apache/solr/search/TestCustomSort.java@@ -151,155 +151,91 @@ public class TestCustomSort extends SolrTestCaseJ4 {assertQ(req("q", "*:*", "fl", "id_i", "sort", "payload asc", "rows", "20"),- "//result[@numFound='13']" // <result name="response" numFound="13" start="0">- ,- "//result/doc[int='7' and position()=1]" // <doc><int name="id">7</int></doc> 00 3c 73- ,- "//result/doc[int='1' and position()=2]" // <doc><int name="id">1</int></doc> 12 62 15- ,- "//result/doc[int='6' and position()=3]" // <doc><int name="id">6</int></doc> 1a 2b 3c- // 00 00 03- ,- "//result/doc[int='4' and position()=4]" // <doc><int name="id">4</int></doc> 25 21 15- ,- "//result/doc[int='2' and position()=5]" // <doc><int name="id">2</int></doc> 25 21 16- ,- "//result/doc[int='10' and position()=6]" // <doc><int name="id">10</int></doc> 31 39 7c- ,- "//result/doc[int='12' and position()=7]" // <doc><int name="id">12</int></doc> 34 dd 4d- ,- "//result/doc[int='3' and position()=8]" // <doc><int name="id">3</int></doc> 35 32 58- ,- "//result/doc[int='5' and position()=9]" // <doc><int name="id">5</int></doc> 35 35 10- // 00- ,- "//result/doc[int='9' and position()=10]" // <doc><int name="id">9</int></doc> 39 79 7a- ,- "//result/doc[int='8' and position()=11]" // <doc><int name="id">8</int></doc> 59 2d 4d- ,- "//result/doc[int='13' and position()=12]" // <doc><int name="id">13</int></doc> 80 11 33- ,- "//result/doc[int='11' and position()=13]"); // <doc><int name="id">11</int></doc> ff af+ "//result[@numFound='13']", // <result name="response" numFound="13" start="0">+ "//result/doc[int='7' and position()=1]", // <doc><int name="id">7</int></doc> 00 3c 73+ "//result/doc[int='1' and position()=2]", // <doc><int name="id">1</int></doc> 12 62 15+ // <doc><int name="id">6</int></doc> 1a 2b 3c 00 00 03+ "//result/doc[int='6' and position()=3]",+ "//result/doc[int='4' and position()=4]", // <doc><int name="id">4</int></doc> 25 21 15+ "//result/doc[int='2' and position()=5]", // <doc><int name="id">2</int></doc> 25 21 16+ "//result/doc[int='10' and position()=6]", // <doc><int name="id">10</int></doc> 31 39 7c+ "//result/doc[int='12' and position()=7]", // <doc><int name="id">12</int></doc> 34 dd 4d+ "//result/doc[int='3' and position()=8]", // <doc><int name="id">3</int></doc> 35 32 58+ "//result/doc[int='5' and position()=9]", // <doc><int name="id">5</int></doc> 35 35 10 00+ "//result/doc[int='9' and position()=10]", // <doc><int name="id">9</int></doc> 39 79 7a+ "//result/doc[int='8' and position()=11]", // <doc><int name="id">8</int></doc> 59 2d 4d+ "//result/doc[int='13' and position()=12]", // <doc><int name="id">13</int></doc> 80 11 33+ "//result/doc[int='11' and position()=13]"); // <doc><int name="id">11</int></doc> ff af// 9cassertQ(req("q", "*:*", "fl", "id_i", "sort", "payload desc", "rows", "20"),- "//result[@numFound='13']" // <result name="response" numFound="13" start="0">- ,- "//result/doc[int='11' and position()=1]" // <doc><int name="id">11</int></doc> ff af 9c- ,- "//result/doc[int='13' and position()=2]" // <doc><int name="id">13</int></doc> 80 11 33- ,- "//result/doc[int='8' and position()=3]" // <doc><int name="id">8</int></doc> 59 2d 4d- ,- "//result/doc[int='9' and position()=4]" // <doc><int name="id">9</int></doc> 39 79 7a- ,- "//result/doc[int='5' and position()=5]" // <doc><int name="id">5</int></doc> 35 35 10- // 00- ,- "//result/doc[int='3' and position()=6]" // <doc><int name="id">3</int></doc> 35 32 58- ,- "//result/doc[int='12' and position()=7]" // <doc><int name="id">12</int></doc> 34 dd 4d- ,- "//result/doc[int='10' and position()=8]" // <doc><int name="id">10</int></doc> 31 39 7c- ,- "//result/doc[int='2' and position()=9]" // <doc><int name="id">2</int></doc> 25 21 16- ,- "//result/doc[int='4' and position()=10]" // <doc><int name="id">4</int></doc> 25 21 15- ,- "//result/doc[int='6' and position()=11]" // <doc><int name="id">6</int></doc> 1a 2b 3c- // 00 00 03- ,- "//result/doc[int='1' and position()=12]" // <doc><int name="id">1</int></doc> 12 62 15- ,- "//result/doc[int='7' and position()=13]"); // <doc><int name="id">7</int></doc> 00 3c+ "//result[@numFound='13']", // <result name="response" numFound="13" start="0">+ "//result/doc[int='11' and position()=1]", // <doc><int name="id">11</int></doc> ff af 9c+ "//result/doc[int='13' and position()=2]", // <doc><int name="id">13</int></doc> 80 11 33+ "//result/doc[int='8' and position()=3]", // <doc><int name="id">8</int></doc> 59 2d 4d+ "//result/doc[int='9' and position()=4]", // <doc><int name="id">9</int></doc> 39 79 7a+ "//result/doc[int='5' and position()=5]", // <doc><int name="id">5</int></doc> 35 35 10 00+ "//result/doc[int='3' and position()=6]", // <doc><int name="id">3</int></doc> 35 32 58+ "//result/doc[int='12' and position()=7]", // <doc><int name="id">12</int></doc> 34 dd 4d+ "//result/doc[int='10' and position()=8]", // <doc><int name="id">10</int></doc> 31 39 7c+ "//result/doc[int='2' and position()=9]", // <doc><int name="id">2</int></doc> 25 21 16+ "//result/doc[int='4' and position()=10]", // <doc><int name="id">4</int></doc> 25 21 15+ // <doc><int name="id">6</int></doc> 1a 2b 3c 00 00 03+ "//result/doc[int='6' and position()=11]",+ "//result/doc[int='1' and position()=12]", // <doc><int name="id">1</int></doc> 12 62 15+ "//result/doc[int='7' and position()=13]"); // <doc><int name="id">7</int></doc> 00 3c// 73assertQ(req("q", "text:a", "fl", "id_i", "sort", "payload asc", "rows", "20"),- "//result[@numFound='4']" // <result name="response" numFound="4" start="0">- ,- "//result/doc[int='1' and position()=1]" // <doc><int name="id">1</int></doc> 12 62 15- ,- "//result/doc[int='3' and position()=2]" // <doc><int name="id">3</int></doc> 35 32 58- ,- "//result/doc[int='5' and position()=3]" // <doc><int name="id">5</int></doc> 35 35 10- // 00- ,- "//result/doc[int='9' and position()=4]"); // <doc><int name="id">9</int></doc> 39 79- // 7a+ "//result[@numFound='4']", // <result name="response" numFound="4" start="0">+ "//result/doc[int='1' and position()=1]", // <doc><int name="id">1</int></doc> 12 62 15+ "//result/doc[int='3' and position()=2]", // <doc><int name="id">3</int></doc> 35 32 58+ "//result/doc[int='5' and position()=3]", // <doc><int name="id">5</int></doc> 35 35 10 00+ "//result/doc[int='9' and position()=4]"); // <doc><int name="id">9</int></doc> 39 79 7aassertQ(req("q", "text:a", "fl", "id_i", "sort", "payload desc", "rows", "20"),- "//result[@numFound='4']" // <result name="response" numFound="4" start="0">- ,- "//result/doc[int='9' and position()=1]" // <doc><int name="id">9</int></doc> 39 79 7a- ,- "//result/doc[int='5' and position()=2]" // <doc><int name="id">5</int></doc> 35 35 10- // 00- ,- "//result/doc[int='3' and position()=3]" // <doc><int name="id">3</int></doc> 35 32 58- ,- "//result/doc[int='1' and position()=4]"); // <doc><int name="id">1</int></doc> 12 62- // 15+ "//result[@numFound='4']", // <result name="response" numFound="4" start="0">+ "//result/doc[int='9' and position()=1]", // <doc><int name="id">9</int></doc> 39 79 7a+ "//result/doc[int='5' and position()=2]", // <doc><int name="id">5</int></doc> 35 35 10 00+ "//result/doc[int='3' and position()=3]", // <doc><int name="id">3</int></doc> 35 32 58+ "//result/doc[int='1' and position()=4]"); // <doc><int name="id">1</int></doc> 12 62 15assertQ(req("q", "text:b", "fl", "id_i", "sort", "payload asc", "rows", "20"),- "//result[@numFound='3']" // <result name="response" numFound="3" start="0">- ,- "//result/doc[int='4' and position()=1]" // <doc><int name="id">4</int></doc> 25 21 15- ,- "//result/doc[int='2' and position()=2]" // <doc><int name="id">2</int></doc> 25 21 16- ,- "//result/doc[int='10' and position()=3]"); // <doc><int name="id">10</int></doc> 31 39- // 7c+ "//result[@numFound='3']", // <result name="response" numFound="3" start="0">+ "//result/doc[int='4' and position()=1]", // <doc><int name="id">4</int></doc> 25 21 15+ "//result/doc[int='2' and position()=2]", // <doc><int name="id">2</int></doc> 25 21 16+ "//result/doc[int='10' and position()=3]"); // <doc><int name="id">10</int></doc> 31 39 7cassertQ(req("q", "text:b", "fl", "id_i", "sort", "payload desc", "rows", "20"),- "//result[@numFound='3']" // <result name="response" numFound="3" start="0">- ,- "//result/doc[int='10' and position()=1]" // <doc><int name="id">10</int></doc> 31 39 7c- ,- "//result/doc[int='2' and position()=2]" // <doc><int name="id">2</int></doc> 25 21 16- ,- "//result/doc[int='4' and position()=3]"); // <doc><int name="id">4</int></doc> 25 21- // 15+ "//result[@numFound='3']", // <result name="response" numFound="3" start="0">+ "//result/doc[int='10' and position()=1]", // <doc><int name="id">10</int></doc> 31 39 7c+ "//result/doc[int='2' and position()=2]", // <doc><int name="id">2</int></doc> 25 21 16+ "//result/doc[int='4' and position()=3]"); // <doc><int name="id">4</int></doc> 25 21 15assertQ(req("q", "text:c", "fl", "id_i", "sort", "payload asc", "rows", "20"),- "//result[@numFound='3']" // <result name="response" numFound="3" start="0">- ,- "//result/doc[int='7' and position()=1]" // <doc><int name="id">7</int></doc> 00 3c 73- ,- "//result/doc[int='6' and position()=2]" // <doc><int name="id">6</int></doc> 1a 2b 3c- // 00 00 03- ,- "//result/doc[int='8' and position()=3]"); // <doc><int name="id">8</int></doc> 59 2d- // 4d+ "//result[@numFound='3']", // <result name="response" numFound="3" start="0">+ "//result/doc[int='7' and position()=1]", // <doc><int name="id">7</int></doc> 00 3c 73+ // <doc><int name="id">6</int></doc> 1a 2b 3c 00 00 03+ "//result/doc[int='6' and position()=2]",+ "//result/doc[int='8' and position()=3]"); // <doc><int name="id">8</int></doc> 59 2d 4dassertQ(req("q", "text:c", "fl", "id_i", "sort", "payload desc", "rows", "20"),- "//result[@numFound='3']" // <result name="response" numFound="3" start="0">- ,- "//result/doc[int='8' and position()=1]" // <doc><int name="id">8</int></doc> 59 2d 4d- ,- "//result/doc[int='6' and position()=2]" // <doc><int name="id">6</int></doc> 1a 2b 3c- // 00 00 03- ,- "//result/doc[int='7' and position()=3]"); // <doc><int name="id">7</int></doc> 00 3c- // 73+ "//result[@numFound='3']", // <result name="response" numFound="3" start="0">+ "//result/doc[int='8' and position()=1]", // <doc><int name="id">8</int></doc> 59 2d 4d+ // <doc><int name="id">6</int></doc> 1a 2b 3c 00 00 03+ "//result/doc[int='6' and position()=2]",+ "//result/doc[int='7' and position()=3]"); // <doc><int name="id">7</int></doc> 00 3c 73assertQ(req("q", "text:d", "fl", "id_i", "sort", "payload asc", "rows", "20"),- "//result[@numFound='3']" // <result name="response" numFound="3" start="0">- ,- "//result/doc[int='12' and position()=1]" // <doc><int name="id">12</int></doc> 34 dd 4d- ,- "//result/doc[int='13' and position()=2]" // <doc><int name="id">13</int></doc> 80 11 33- ,- "//result/doc[int='11' and position()=3]"); // <doc><int name="id">11</int></doc> ff af- // 9c+ "//result[@numFound='3']", // <result name="response" numFound="3" start="0">+ "//result/doc[int='12' and position()=1]", // <doc><int name="id">12</int></doc> 34 dd 4d+ "//result/doc[int='13' and position()=2]", // <doc><int name="id">13</int></doc> 80 11 33+ "//result/doc[int='11' and position()=3]"); // <doc><int name="id">11</int></doc> ff af 9cassertQ(req("q", "text:d", "fl", "id_i", "sort", "payload desc", "rows", "20"),- "//result[@numFound='3']" // <result name="response" numFound="3" start="0">- ,- "//result/doc[int='11' and position()=1]" // <doc><int name="id">11</int></doc> ff af 9c- ,- "//result/doc[int='13' and position()=2]" // <doc><int name="id">13</int></doc> 80 11 33- ,- "//result/doc[int='12' and position()=3]"); // <doc><int name="id">12</int></doc> 34 dd- // 4d+ "//result[@numFound='3']", // <result name="response" numFound="3" start="0">+ "//result/doc[int='11' and position()=1]", // <doc><int name="id">11</int></doc> ff af 9c+ "//result/doc[int='13' and position()=2]", // <doc><int name="id">13</int></doc> 80 11 33+ "//result/doc[int='12' and position()=3]"); // <doc><int name="id">12</int></doc> 34 dd 4d}}diff --git a/solr/core/src/test/org/apache/solr/search/TestExtendedDismaxParser.java b/solr/core/src/test/org/apache/solr/search/TestExtendedDismaxParser.javaindex a66a84d0874..cf16792399a 100644--- a/solr/core/src/test/org/apache/solr/search/TestExtendedDismaxParser.java+++ b/solr/core/src/test/org/apache/solr/search/TestExtendedDismaxParser.java@@ -1952,8 +1952,7 @@ public class TestExtendedDismaxParser extends SolrTestCaseJ4 {// The results for these two appear odd, but are correct as per BooleanQuery processing.// See: http://searchhub.org/2011/12/28/why-not-and-or-and-not/// Non-parenthesis OR/AND precedence is not true to abstract boolean logic in solr when q.op =- // AND- // and when q.op = OR all three clauses are top-level and optional so mm takes over+ // AND and when q.op = OR all three clauses are top-level and optional so mm takes overassertQ("test minShouldMatch (top level optional with explicit OR without parens)",req(@@ -2274,8 +2273,7 @@ public class TestExtendedDismaxParser extends SolrTestCaseJ4 {req("qf", "text_sw title", "defType", "edismax", "q", "wi fi", "sow", "true"),"/response/numFound==0");assertJQ(- req("qf", "text_sw title", "defType", "edismax", "q", "wi fi") // default sow=false- ,+ req("qf", "text_sw title", "defType", "edismax", "q", "wi fi"), // default sow=false"/response/numFound==1","/response/docs/[0]/id=='72'");@@ -2285,8 +2283,7 @@ public class TestExtendedDismaxParser extends SolrTestCaseJ4 {"/response/docs/[0]/id=='72'");assertJQ(req("qf", "text_sw title", "q", "{!edismax sow=true}wi fi"), "/response/numFound==0");assertJQ(- req("qf", "text_sw title", "q", "{!edismax}wi fi") // default sow=false- ,+ req("qf", "text_sw title", "q", "{!edismax}wi fi"), // default sow=false"/response/numFound==1","/response/docs/[0]/id=='72'");diff --git a/solr/core/src/test/org/apache/solr/search/TestMissingGroups.java b/solr/core/src/test/org/apache/solr/search/TestMissingGroups.javaindex f86dcd04f6d..4afa4d2d066 100644--- a/solr/core/src/test/org/apache/solr/search/TestMissingGroups.java+++ b/solr/core/src/test/org/apache/solr/search/TestMissingGroups.java@@ -106,16 +106,13 @@ public class TestMissingGroups extends SolrTestCaseJ4 {"group.field",special.field,"group.ngroups",- "true")+ "true"),// basic grouping checks- ,xpre + "/int[@name='ngroups'][.='3']",- xpre + "/arr[@name='groups'][count(lst)=3]"+ xpre + "/arr[@name='groups'][count(lst)=3]",// sanity check one group is the missing values- ,- xpre + "/arr[@name='groups']/lst/null[@name='groupValue']"+ xpre + "/arr[@name='groups']/lst/null[@name='groupValue']",// check we have the correct groups for the special values with a single doc- ,xpre+ "/arr[@name='groups']/lst/*[@name='groupValue'][.='"+ special.valueX@@ -145,16 +142,13 @@ public class TestMissingGroups extends SolrTestCaseJ4 {"group.field",special.field,"group.ngroups",- "true")+ "true"),// basic grouping checks- ,xpre + "/int[@name='ngroups'][.='2']",- xpre + "/arr[@name='groups'][count(lst)=2]"+ xpre + "/arr[@name='groups'][count(lst)=2]",// sanity check one group is the missing values- ,- xpre + "/arr[@name='groups']/lst/null[@name='groupValue']"+ xpre + "/arr[@name='groups']/lst/null[@name='groupValue']",// check we have the correct group for the special value with a single doc- ,xpre+ "/arr[@name='groups']/lst/*[@name='groupValue'][.='"+ val@@ -178,13 +172,11 @@ public class TestMissingGroups extends SolrTestCaseJ4 {"group.field",special.field,"group.ngroups",- "true")+ "true"),// basic grouping checks- ,xpre + "/int[@name='ngroups'][.='1']",- xpre + "/arr[@name='groups'][count(lst)=1]"+ xpre + "/arr[@name='groups'][count(lst)=1]",// the only group should be the missing values- ,xpre + "/arr[@name='groups']/lst/null[@name='groupValue']");}}diff --git a/solr/core/src/test/org/apache/solr/search/TestPseudoReturnFields.java b/solr/core/src/test/org/apache/solr/search/TestPseudoReturnFields.javaindex a5a2c2020b3..f551defe10b 100644--- a/solr/core/src/test/org/apache/solr/search/TestPseudoReturnFields.java+++ b/solr/core/src/test/org/apache/solr/search/TestPseudoReturnFields.java@@ -272,9 +272,8 @@ public class TestPseudoReturnFields extends SolrTestCaseJ4 {assertQ("id=" + id + ", params=" + p,req(p),- "count(//doc)=1"+ "count(//doc)=1",// true for both these specific docs- ,"//doc/double[@name='log(val_i)'][.='0.0']","//doc/float[@name='abs(val_i)'][.='1.0']","//doc[count(*)=2]");@@ -309,9 +308,8 @@ public class TestPseudoReturnFields extends SolrTestCaseJ4 {assertQ(id + " " + p,req(p, "qt", "/get", "wt", "xml", "id", id),- "count(//doc)=1"+ "count(//doc)=1",// true for both these specific docs- ,"//doc/double[@name='log(val_i)'][.='0.0']","//doc/int[@name='val_i'][.='1']","//doc[count(*)=2]");@@ -415,8 +413,7 @@ public class TestPseudoReturnFields extends SolrTestCaseJ4 {req(p, "qt", "/get", "id", id, "wt", "xml"),"count(//doc)=1","//doc/int[@name='val_i'][.=1]",- "//doc/str[@name='subject']" // value differs between docs- ,+ "//doc/str[@name='subject']", // value differs between docs"//doc/str[@name='ssto'][.='X']","//doc[count(*)=3]");}@@ -601,9 +598,8 @@ public class TestPseudoReturnFields extends SolrTestCaseJ4 {"count(//doc)=1","//doc/int[@name='[docid]'][.>=-1]","//doc/float[@name='abs(val_i)'][.='1.0']",- "//doc/str[@name='[shard]'][.='[not a shard request]']"+ "//doc/str[@name='[shard]'][.='[not a shard request]']",// RTG: [explain] should be missing (ignored)- ,"//doc/int[@name='x_alias'][.=10]","//doc[count(*)=4]");}@@ -660,9 +656,8 @@ public class TestPseudoReturnFields extends SolrTestCaseJ4 {"count(//doc)=1","//doc/str[@name='id']","//doc/int[@name='[docid]'][.>=-1]",- "//doc/float[@name='abs(val_i)'][.='1.0']"+ "//doc/float[@name='abs(val_i)'][.='1.0']",// RTG: [explain] should be missing (ignored)- ,"//doc/int[@name='x_alias'][.=10]","//doc[count(*)=4]");}@@ -741,13 +736,10 @@ public class TestPseudoReturnFields extends SolrTestCaseJ4 {assertQ(p.toString(),req(p, "qt", "/get", "id", id, "wt", "xml"),- "//doc/int[@name='[docid]']" // TODO- ,+ "//doc/int[@name='[docid]']", // TODO"//doc/float[@name='abs(val_i)'][.='1.0']",- "//doc/int[@name='x_alias'][.=10]"+ "//doc/int[@name='x_alias'][.=10]",// RTG: [explain] and score should be missing (ignored)-- ,"//doc[count(*)=3]");}}@@ -812,9 +804,8 @@ public class TestPseudoReturnFields extends SolrTestCaseJ4 {"count(//doc)=1","//doc/str[@name='id']","//doc/int[@name='[docid]'][.>=-1]",- "//doc/float[@name='abs(val_i)'][.='1.0']"+ "//doc/float[@name='abs(val_i)'][.='1.0']",// RTG: [explain] and score should be missing (ignored)- ,"//doc/int[@name='val_i'][.=1]","//doc/str[@name='subject']","//doc[count(*)=5]");diff --git a/solr/core/src/test/org/apache/solr/search/TestQueryTypes.java b/solr/core/src/test/org/apache/solr/search/TestQueryTypes.javaindex aaff821fb53..4e077bfab5b 100644--- a/solr/core/src/test/org/apache/solr/search/TestQueryTypes.java+++ b/solr/core/src/test/org/apache/solr/search/TestQueryTypes.java@@ -127,8 +127,7 @@ public class TestQueryTypes extends SolrTestCaseJ4 {"q","{!terms f=v_s method="+ termsMethod- + " }wow dude,other stuff") // terms reverse sorted to show this works- ,+ + " }wow dude,other stuff"), // terms reverse sorted to show this works"//result[@numFound='2']");// frange and function query only work on single valued field types@@ -523,9 +522,8 @@ public class TestQueryTypes extends SolrTestCaseJ4 {}// Skipping: func, boost, raw, nested, frange, spatial*, join, surround, switch, parent,- // child, collapsing,- // complexphrase, rerank, export, mlt, hash, graph, graphTerms, igain, tlogit,- // significantTerms, payload*+ // child, collapsing, complexphrase, rerank, export, mlt, hash, graph, graphTerms, igain,+ // tlogit, significantTerms, payload*// Maybe add: raw, join, parent, child, collapsing, graphTerms, igain, significantTerms,// simple}diff --git a/solr/core/src/test/org/apache/solr/search/TestSearchPerf.java b/solr/core/src/test/org/apache/solr/search/TestSearchPerf.javaindex 7ebff71b0c5..d6bbfd46127 100644--- a/solr/core/src/test/org/apache/solr/search/TestSearchPerf.java+++ b/solr/core/src/test/org/apache/solr/search/TestSearchPerf.java@@ -62,11 +62,10 @@ public class TestSearchPerf extends SolrTestCaseJ4 {assertU(adoc("id",- Float.toString(i)+ Float.toString(i),// ,"foo1_s",t(0)// ,"foo2_s",t(r.nextInt(2))// ,"foo4_s",t(r.nextInt(3))- ,"foomany_s",t(r.nextInt(nDocs * 10))));}diff --git a/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial.java b/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial.javaindex 5e3610defcd..597553553d0 100644--- a/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial.java+++ b/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial.java@@ -423,8 +423,7 @@ public class TestSolr4Spatial extends SolrTestCaseJ4 {"pt","3,4"),1e-3,- "/response/docs/[0]/id=='101'" // FLIPPED- ,+ "/response/docs/[0]/id=='101'", // FLIPPED"/response/docs/[1]/id=='100'" // FLIPPED);@@ -445,8 +444,7 @@ public class TestSolr4Spatial extends SolrTestCaseJ4 {req("q", radiusQuery(3, 4, 9, "distance", null),"fl", "id,score",- "sort", "score asc") // want ascending due to increasing distance- ,+ "sort", "score asc"), // want ascending due to increasing distance1e-3,"/response/docs/[0]/id=='100'","/response/docs/[0]/score==2.827493",@@ -457,8 +455,7 @@ public class TestSolr4Spatial extends SolrTestCaseJ4 {req("q", radiusQuery(3, 4, 9, "recipDistance", null),"fl", "id,score",- "sort", "score desc") // want descending- ,+ "sort", "score desc"), // want descending1e-3,"/response/docs/[0]/id=='100'","/response/docs/[0]/score==0.3099695",@@ -471,8 +468,7 @@ public class TestSolr4Spatial extends SolrTestCaseJ4 {// circle radius is small and shouldn't match either, but we disable filtering"q", radiusQuery(3, 4, 0.000001, "distance", "false"),"fl", "id,score",- "sort", "score asc") // want ascending due to increasing distance- ,+ "sort", "score asc"), // want ascending due to increasing distance1e-3,"/response/docs/[0]/id=='100'","/response/docs/[0]/score==2.827493",@@ -484,8 +480,7 @@ public class TestSolr4Spatial extends SolrTestCaseJ4 {req("q", radiusQuery(4, 0, 9, "distance", null),"fl", "id,score",- "sort", "score asc") // want ascending due to increasing distance- ,+ "sort", "score asc"), // want ascending due to increasing distance1e-4,"/response/docs/[0]/id=='101'","/response/docs/[1]/id=='100'");@@ -569,8 +564,7 @@ public class TestSolr4Spatial extends SolrTestCaseJ4 {req("q", radiusQuery(3, 4, 9, "distance", null),"fl", "id,score",- "sort", "score asc") // want ascending due to increasing distance- ,+ "sort", "score asc"), // want ascending due to increasing distance1e-4,"/response/docs/[0]/id=='101'","/response/docs/[0]/score==0.99862987" // dist to 3,5diff --git a/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial2.java b/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial2.javaindex b2474d72071..a85a129621f 100644--- a/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial2.java+++ b/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial2.java@@ -426,9 +426,8 @@ public class TestSolr4Spatial2 extends SolrTestCaseJ4 {}if (testPolygon) {- String polygonWKT =- "POLYGON((-11 12, -11 11, 10.5 12, -11 12))"; // right-angle triangle. Counter-clockwise- // order+ // right-angle triangle. Counter-clockwise order+ String polygonWKT = "POLYGON((-11 12, -11 11, 10.5 12, -11 12))";assertJQ(req("q",diff --git a/solr/core/src/test/org/apache/solr/search/TestSolrQueryParser.java b/solr/core/src/test/org/apache/solr/search/TestSolrQueryParser.javaindex 0b14cf1557c..49f0cd872d3 100644--- a/solr/core/src/test/org/apache/solr/search/TestSolrQueryParser.java+++ b/solr/core/src/test/org/apache/solr/search/TestSolrQueryParser.java@@ -188,8 +188,7 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {// is not a phrase query. As a result, docs can match that don't match phrase query "now cow"assertQ(req("q", "text:now-cow", "indent", "true", "sow", "false"), "//*[@numFound='2']");assertQ(- req("q", "text:now-cow", "indent", "true") // default sow=false- ,+ req("q", "text:now-cow", "indent", "true"), // default sow=false"//*[@numFound='2']");// "text_np" field's type has WDGFF and (default) autoGeneratePhraseQueries=false@@ -206,15 +205,13 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {assertJQ(req("q", "qaz {!term f=text}now wsx", "qq", "now"), "/response/numFound==2");assertJQ(- req("q", "qaz {!term f=foo_s v='a \\' \" \\\\ {! ) } ( { z'} wsx") // single quote escaping- ,+ req("q", "qaz {!term f=foo_s v='a \\' \" \\\\ {! ) } ( { z'} wsx"), // single quote escaping"/response/numFound==1");assertJQ(req("q",- "qaz {!term f=foo_s v=\"a ' \\\" \\\\ {! ) } ( { z\"} wsx") // double quote escaping- ,+ "qaz {!term f=foo_s v=\"a ' \\\" \\\\ {! ) } ( { z\"} wsx"), // double quote escaping"/response/numFound==1");// double-join to test back-to-back local params@@ -811,21 +808,18 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {assertJQ(req("df", "syn", "q", "wifi", "sow",- "true") // retrieve the single document containing literal "wifi"- ,+ "true"), // retrieve the single document containing literal "wifi""/response/numFound==1","/response/docs/[0]/id=='20'");assertJQ(- req("df", "syn", "q", "wi fi", "sow", "false") // trigger the "wi fi => wifi" synonym- ,+ req("df", "syn", "q", "wi fi", "sow", "false"), // trigger the "wi fi => wifi" synonym"/response/numFound==1","/response/docs/[0]/id=='20'");assertJQ(req("df", "syn", "q", "wi fi", "sow", "true"), "/response/numFound==0");assertJQ(- req("df", "syn", "q", "wi fi") // default sow=false- ,+ req("df", "syn", "q", "wi fi"), // default sow=false"/response/numFound==1","/response/docs/[0]/id=='20'");@@ -836,8 +830,7 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {assertJQ(req("df", "syn", "q", "{!lucene sow=true}wi fi"), "/response/numFound==0");assertJQ(- req("df", "syn", "q", "{!lucene}wi fi") // default sow=false- ,+ req("df", "syn", "q", "{!lucene}wi fi"), // default sow=false"/response/numFound==1","/response/docs/[0]/id=='20'");}@@ -848,13 +841,11 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {assertJQ(req("df", "syn", "q", "wifi", "sow",- "true") // retrieve the single document containing literal "wifi"- ,+ "true"), // retrieve the single document containing literal "wifi""/response/numFound==1","/response/docs/[0]/id=='20'");assertJQ(- req("df", "syn", "q", "wi fi", "sow", "false") // trigger the "wi fi => wifi" synonym- ,+ req("df", "syn", "q", "wi fi", "sow", "false"), // trigger the "wi fi => wifi" synonym"/response/numFound==1","/response/docs/[0]/id=='20'");assertJQ(@@ -864,8 +855,7 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {"q","wi /* foo */ fi","sow",- "false") // trigger the "wi fi => wifi" synonym- ,+ "false"), // trigger the "wi fi => wifi" synonym"/response/numFound==1","/response/docs/[0]/id=='20'");assertJQ(@@ -875,8 +865,7 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {"q","wi /* foo */ /* bar */ fi","sow",- "false") // trigger the "wi fi => wifi" synonym- ,+ "false"), // trigger the "wi fi => wifi" synonym"/response/numFound==1","/response/docs/[0]/id=='20'");assertJQ(@@ -886,8 +875,7 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {"q"," /* foo */ wi fi /* bar */","sow",- "false") // trigger the "wi fi => wifi" synonym- ,+ "false"), // trigger the "wi fi => wifi" synonym"/response/numFound==1","/response/docs/[0]/id=='20'");assertJQ(@@ -897,8 +885,7 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {"q"," /* foo */ wi /* bar */ fi /* baz */","sow",- "false") // trigger the "wi fi => wifi" synonym- ,+ "false"), // trigger the "wi fi => wifi" synonym"/response/numFound==1","/response/docs/[0]/id=='20'");@@ -913,28 +900,23 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {"/response/numFound==0");assertJQ(- req("df", "syn", "q", "wi fi") // default sow=false- ,+ req("df", "syn", "q", "wi fi"), // default sow=false"/response/numFound==1","/response/docs/[0]/id=='20'");assertJQ(- req("df", "syn", "q", "wi /* foo */ fi") // default sow=false- ,+ req("df", "syn", "q", "wi /* foo */ fi"), // default sow=false"/response/numFound==1","/response/docs/[0]/id=='20'");assertJQ(- req("df", "syn", "q", "wi /* foo */ /* bar */ fi") // default sow=false- ,+ req("df", "syn", "q", "wi /* foo */ /* bar */ fi"), // default sow=false"/response/numFound==1","/response/docs/[0]/id=='20'");assertJQ(- req("df", "syn", "q", " /* foo */ wi fi /* bar */") // default sow=false- ,+ req("df", "syn", "q", " /* foo */ wi fi /* bar */"), // default sow=false"/response/numFound==1","/response/docs/[0]/id=='20'");assertJQ(- req("df", "syn", "q", " /* foo */ wi /* bar */ fi /* baz */") // default sow=false- ,+ req("df", "syn", "q", " /* foo */ wi /* bar */ fi /* baz */"), // default sow=false"/response/numFound==1","/response/docs/[0]/id=='20'");@@ -972,28 +954,23 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {"/response/numFound==0");assertJQ(- req("df", "syn", "q", "{!lucene}wi fi") // default sow=false- ,+ req("df", "syn", "q", "{!lucene}wi fi"), // default sow=false"/response/numFound==1","/response/docs/[0]/id=='20'");assertJQ(- req("df", "syn", "q", "{!lucene}wi /* foo */ fi") // default sow=false- ,+ req("df", "syn", "q", "{!lucene}wi /* foo */ fi"), // default sow=false"/response/numFound==1","/response/docs/[0]/id=='20'");assertJQ(- req("df", "syn", "q", "{!lucene}wi /* foo */ /* bar */ fi") // default sow=false- ,+ req("df", "syn", "q", "{!lucene}wi /* foo */ /* bar */ fi"), // default sow=false"/response/numFound==1","/response/docs/[0]/id=='20'");assertJQ(- req("df", "syn", "q", "{!lucene}/* foo */ wi fi /* bar */") // default sow=false- ,+ req("df", "syn", "q", "{!lucene}/* foo */ wi fi /* bar */"), // default sow=false"/response/numFound==1","/response/docs/[0]/id=='20'");assertJQ(- req("df", "syn", "q", "{!lucene}/* foo */ wi /* bar */ fi /* baz */") // default sow=false- ,+ req("df", "syn", "q", "{!lucene}/* foo */ wi /* bar */ fi /* baz */"), // default sow=false"/response/numFound==1","/response/docs/[0]/id=='20'");}@@ -1004,13 +981,11 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {assertJQ(req("df", "syn", "q", "wifi", "sow",- "true") // retrieve the single document containing literal "wifi"- ,+ "true"), // retrieve the single document containing literal "wifi""/response/numFound==1","/response/docs/[0]/id=='20'");assertJQ(- req("df", "syn", "q", "wi fi", "sow", "false") // trigger the "wi fi => wifi" synonym- ,+ req("df", "syn", "q", "wi fi", "sow", "false"), // trigger the "wi fi => wifi" synonym"/response/numFound==1","/response/docs/[0]/id=='20'");@@ -1018,8 +993,7 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {assertJQ(req("df", "syn", "q", "-wi fi", "sow", "false"), "/response/numFound==0");assertJQ(req("df", "syn", "q", "!wi fi", "sow", "false"), "/response/numFound==0");assertJQ(- req("df", "syn", "q", "wi* fi", "sow", "false") // matches because wi* matches wifi- ,+ req("df", "syn", "q", "wi* fi", "sow", "false"), // matches because wi* matches wifi"/response/numFound==1");assertJQ(req("df", "syn", "q", "w? fi", "sow", "false"), "/response/numFound==0");assertJQ(req("df", "syn", "q", "wi~1 fi", "sow", "false"), "/response/numFound==0");diff --git a/solr/core/src/test/org/apache/solr/search/TestTrieFacet.java b/solr/core/src/test/org/apache/solr/search/TestTrieFacet.javaindex 2bde49506ae..7d49e9d68be 100644--- a/solr/core/src/test/org/apache/solr/search/TestTrieFacet.java+++ b/solr/core/src/test/org/apache/solr/search/TestTrieFacet.java@@ -167,12 +167,10 @@ public class TestTrieFacet extends SolrTestCaseJ4 {"facet.mincount","0","facet.method",- method)+ method),// trivial sanity check we're at least getting facet counts in output- ,- "*[count(//lst[@name='facet_fields']/lst[@name='" + field + "']/int)!=0]"+ "*[count(//lst[@name='facet_fields']/lst[@name='" + field + "']/int)!=0]",// main point of test- ,"*[count(//lst[@name='facet_fields']/lst[@name='" + field + "']/int[@name='0'])=0]");}diff --git a/solr/core/src/test/org/apache/solr/search/facet/TestCloudJSONFacetSKG.java b/solr/core/src/test/org/apache/solr/search/facet/TestCloudJSONFacetSKG.javaindex 3a9773e21f6..9ae7a0e103f 100644--- a/solr/core/src/test/org/apache/solr/search/facet/TestCloudJSONFacetSKG.java+++ b/solr/core/src/test/org/apache/solr/search/facet/TestCloudJSONFacetSKG.java@@ -851,9 +851,8 @@ public class TestCloudJSONFacetSKG extends SolrCloudTestCase {Math.max(1, TestUtil.nextInt(random(), -1, 3)); // 3/5th chance of being '1'Map<String, TermFacet> results = new LinkedHashMap<>();for (int i = 0; i < numFacets; i++) {- if (keyCounter.get()- < 3) { // a hard limit on the total number of facets (regardless of depth) to reduce OOM- // risk+ // a hard limit on the total number of facets (regardless of depth) to reduce OOM risk+ if (keyCounter.get() < 3) {final String sort = randomSortParam(random());final String facetField = randomFacetField(random());diff --git a/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java b/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.javaindex cb11a707cdd..bcfe270d4f3 100644--- a/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java+++ b/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java@@ -2054,8 +2054,7 @@ public class TestJsonFacets extends SolrTestCaseHS {p,"q","*:*",- "json.facet" // num_d- ,+ "json.facet", // num_d"{f1:{terms:{${terms} field:'${cat_s}', "+ " prelim_sort:'count desc', sort:'n1 desc', facet:{n1:'sum(${num_d})'} }},"+ " f2:{terms:{${terms} field:'${cat_s}', "@@ -2068,8 +2067,7 @@ public class TestJsonFacets extends SolrTestCaseHS {p,"q","*:*",- "json.facet" // num_i- ,+ "json.facet", // num_i"{f1:{terms:{${terms} field:'${cat_s}', "+ " prelim_sort:'count desc', sort:'n1 desc', facet:{n1:'sum(${num_i})'} }},"+ " f2:{terms:{${terms} field:'${cat_s}', "@@ -3034,9 +3032,8 @@ public class TestJsonFacets extends SolrTestCaseHS {params(p,"q",- "*:*"+ "*:*",// , "json.facet", "{f1:{terms:{field:'${cat_s}', mincount:3}}}"- ,"facet","true","facet.version",@@ -3052,10 +3049,9 @@ public class TestJsonFacets extends SolrTestCaseHS {params(p,"q",- "*:*"+ "*:*",// , "json.facet", "{f1:{terms:{field:${super_s}, prefix:s, mincount:0 }}}" // even// with mincount=0, we should only see buckets with the prefix- ,"facet","true","facet.version",@@ -3074,10 +3070,9 @@ public class TestJsonFacets extends SolrTestCaseHS {params(p,"q",- "*:*"+ "*:*",// , "json.facet", "{f:{range:{field:${num_d}, start:-5, end:10, gap:5, facet:{// x:'sum(${num_i})', ny:{query:'${where_s}:NY'}} }}}"- ,"facet","true","facet.version",@@ -3101,11 +3096,10 @@ public class TestJsonFacets extends SolrTestCaseHS {params(p,"q",- "*:*"+ "*:*",// , "json.facet", "{f1:{terms:{field:'${cat_s}', sort:'n1 desc',// facet:{n1:'sum(${num_d})'} }}" +// " , f2:{terms:{field:'${cat_s}', sort:'n1 asc', facet:{n1:'sum(${num_d})'} }} }"- ,"facet","true","facet.version",@@ -3129,10 +3123,9 @@ public class TestJsonFacets extends SolrTestCaseHS {params(p,"q",- "id:(3 4 6)"+ "id:(3 4 6)",// , "json.facet", "{f:{range:{field:${num_d}, start:-5, end:10, gap:5, other:all,// facet:{ x:'sum(${num_i})', ny:{query:'${where_s}:NY'}} }}}"- ,"facet","true","facet.version",@@ -3521,8 +3514,7 @@ public class TestJsonFacets extends SolrTestCaseHS {params(p,"q",- "*:* -(+${cat_s}:A +${where_s}:NJ)" // make NY the only value in bucket A- ,+ "*:* -(+${cat_s}:A +${where_s}:NJ)", // make NY the only value in bucket A"json.facet","{"+ " f1:{type:terms, field:'${cat_s}', facet:{min:'min(${where_s})', max:'max(${where_s})'} }"@@ -3793,8 +3785,7 @@ public class TestJsonFacets extends SolrTestCaseHS {List<SolrClient> clients = client.getClientProvider().all();// carefully craft two balanced shards (assuming we have at least two) and leave any other- // shards- // empty to help check the code paths of some shards returning no buckets.+ // shards empty to help check the code paths of some shards returning no buckets.//// if we are in a single node sitaution, these clients will be the same, and we'll have the same// total docs in our collection, but the numShardsWithData will be diff@@ -4940,9 +4931,8 @@ public class TestJsonFacets extends SolrTestCaseHS {"json.facet","{cat_s:{type:terms,field:cat_s,mincount:0,missing:true,allBuckets:true,numBuckets:true,limit:1}}"),"/response/lst[@name='facets']/long[@name='count'][.=6]", // count- "/response/lst[@name='facets']/lst[@name='cat_s']/long[@name='numBuckets'][.=2]", // total- // no of- // buckets+ // total number of buckets+ "/response/lst[@name='facets']/lst[@name='cat_s']/long[@name='numBuckets'][.=2]","*[count(/response/lst[@name='facets']/lst[@name='cat_s']/arr[@name='buckets']/lst)=1]", // no of entries"/response/lst[@name='facets']/lst[@name='cat_s']/lst[@name='allBuckets']/long[@name='count'][.=5]", // allBuckets"/response/lst[@name='facets']/lst[@name='cat_s']/lst[@name='missing']/long[@name='count'][.=1]", // missingdiff --git a/solr/core/src/test/org/apache/solr/search/facet/TestJsonRangeFacets.java b/solr/core/src/test/org/apache/solr/search/facet/TestJsonRangeFacets.javaindex 4cd5a21a683..31e7726ff87 100644--- a/solr/core/src/test/org/apache/solr/search/facet/TestJsonRangeFacets.java+++ b/solr/core/src/test/org/apache/solr/search/facet/TestJsonRangeFacets.java@@ -207,8 +207,7 @@ public class TestJsonRangeFacets extends SolrTestCaseHS {// the behavior should be the same, regardless of wether we pass actual_end to the shards// because in a "mixed mode" rolling update, the shards should be smart enough to re-compute- // if- // the merging node is running an older version that doesn't send it+ // if the merging node is running an older version that doesn't send itfor (String actual_end : Arrays.asList(", _actual_end:'9'", "")) {client.testJQ(params(@@ -620,9 +619,8 @@ public class TestJsonRangeFacets extends SolrTestCaseHS {"/response/lst[@name='facets']/long[@name='count'][.=6]", // count"/response/lst[@name='facets']/lst[@name='num']/arr[@name='buckets']/lst[1]/int[@name='val'][.=2]", // value"/response/lst[@name='facets']/lst[@name='num']/arr[@name='buckets']/lst[1]/long[@name='count'][.=2]", // count- "*[count(/response/lst[@name='facets']/lst[@name='num']/arr[@name='buckets']/lst)=2]", // no- // of- // entries+ // number of entries+ "*[count(/response/lst[@name='facets']/lst[@name='num']/arr[@name='buckets']/lst)=2]","/response/lst[@name='facets']/lst[@name='num']/lst[@name='before']/long[@name='count'][.=2]", // before"/response/lst[@name='facets']/lst[@name='num']/lst[@name='after']/long[@name='count'][.=0]", // after"/response/lst[@name='facets']/lst[@name='num']/lst[@name='between']/long[@name='count'][.=3]" // between@@ -640,9 +638,7 @@ public class TestJsonRangeFacets extends SolrTestCaseHS {"/response/lst[@name='facets']/long[@name='count'][.=6]", // count"/response/lst[@name='facets']/lst[@name='num']/arr[@name='buckets']/lst[1]/str[@name='val'][.='[0,4)']", // value"/response/lst[@name='facets']/lst[@name='num']/arr[@name='buckets']/lst[1]/long[@name='count'][.=2]", // count- "*[count(/response/lst[@name='facets']/lst[@name='num']/arr[@name='buckets']/lst)=1]" // no- // of- // entries- );+ // number of entries+ "*[count(/response/lst[@name='facets']/lst[@name='num']/arr[@name='buckets']/lst)=1]");}}diff --git a/solr/core/src/test/org/apache/solr/search/function/SortByFunctionTest.java b/solr/core/src/test/org/apache/solr/search/function/SortByFunctionTest.javaindex 8d27810900a..b79b37ff45e 100644--- a/solr/core/src/test/org/apache/solr/search/function/SortByFunctionTest.java+++ b/solr/core/src/test/org/apache/solr/search/function/SortByFunctionTest.java@@ -262,25 +262,19 @@ public class SortByFunctionTest extends SolrTestCaseJ4 {assertQ(req("q", "*:*", "sort", primarySort + " asc, secondary_tl1 asc"),- "//*[@numFound='9']"- //- ,+ "//*[@numFound='9']","//result/doc[1]/long[@name='primary_tl1'][.='" + X + "']","//result/doc[1]/long[@name='secondary_tl1'][.='0']","//result/doc[2]/long[@name='primary_tl1'][.='" + X + "']","//result/doc[2]/long[@name='secondary_tl1'][.='1']","//result/doc[3]/long[@name='primary_tl1'][.='" + X + "']",- "//result/doc[3]/long[@name='secondary_tl1'][.='2']"- //- ,+ "//result/doc[3]/long[@name='secondary_tl1'][.='2']","//result/doc[4]/long[@name='primary_tl1'][.='" + Y + "']","//result/doc[4]/long[@name='secondary_tl1'][.='0']","//result/doc[5]/long[@name='primary_tl1'][.='" + Y + "']","//result/doc[5]/long[@name='secondary_tl1'][.='1']","//result/doc[6]/long[@name='primary_tl1'][.='" + Y + "']",- "//result/doc[6]/long[@name='secondary_tl1'][.='2']"- //- ,+ "//result/doc[6]/long[@name='secondary_tl1'][.='2']","//result/doc[7]/long[@name='primary_tl1'][.='" + Z + "']","//result/doc[7]/long[@name='secondary_tl1'][.='0']","//result/doc[8]/long[@name='primary_tl1'][.='" + Z + "']",diff --git a/solr/core/src/test/org/apache/solr/search/function/TestMinMaxOnMultiValuedField.java b/solr/core/src/test/org/apache/solr/search/function/TestMinMaxOnMultiValuedField.javaindex 56f9e43a028..411ca40b1f3 100644--- a/solr/core/src/test/org/apache/solr/search/function/TestMinMaxOnMultiValuedField.java+++ b/solr/core/src/test/org/apache/solr/search/function/TestMinMaxOnMultiValuedField.java@@ -147,33 +147,29 @@ public class TestMinMaxOnMultiValuedField extends SolrTestCaseJ4 {adoc(sdoc("id",- "1"+ "1",// int- ,intField,"42",intField,"9",intField,- "-54"+ "-54",// long- ,longField,"420",longField,"90",longField,- "-540"+ "-540",// float- ,floatField,"-42.5",floatField,"-4.5",floatField,- "-13.5"+ "-13.5",// double- ,doubleField,"-420.5",doubleField,@@ -185,9 +181,8 @@ public class TestMinMaxOnMultiValuedField extends SolrTestCaseJ4 {assertQ(req("q",- "id:1"+ "id:1",// int- ,"fl","exists_min_i:exists(field(" + intField + ",min))","fl",@@ -195,9 +190,8 @@ public class TestMinMaxOnMultiValuedField extends SolrTestCaseJ4 {"fl","min_i:field(" + intField + ",min)","fl",- "max_i:field(" + intField + ",max)"+ "max_i:field(" + intField + ",max)",// long- ,"fl","exists_min_l:exists(field(" + longField + ",min))","fl",@@ -205,9 +199,8 @@ public class TestMinMaxOnMultiValuedField extends SolrTestCaseJ4 {"fl","min_l:field(" + longField + ",min)","fl",- "max_l:field(" + longField + ",max)"+ "max_l:field(" + longField + ",max)",// float- ,"fl","exists_min_f:exists(field(" + floatField + ",min))","fl",@@ -215,9 +208,8 @@ public class TestMinMaxOnMultiValuedField extends SolrTestCaseJ4 {"fl","min_f:field(" + floatField + ",min)","fl",- "max_f:field(" + floatField + ",max)"+ "max_f:field(" + floatField + ",max)",// double- ,"fl","exists_min_d:exists(field(" + doubleField + ",min))","fl",@@ -226,27 +218,23 @@ public class TestMinMaxOnMultiValuedField extends SolrTestCaseJ4 {"min_d:field(" + doubleField + ",min)","fl","max_d:field(" + doubleField + ",max)"),- "//*[@numFound='1']"+ "//*[@numFound='1']",// int- ,"//bool[@name='exists_min_i']='true'","//bool[@name='exists_max_i']='true'","//int[@name='min_i']='-54'",- "//int[@name='max_i']='42'"+ "//int[@name='max_i']='42'",// long- ,"//bool[@name='exists_min_l']='true'","//bool[@name='exists_max_l']='true'","//long[@name='min_l']='-540'",- "//long[@name='max_l']='420'"+ "//long[@name='max_l']='420'",// float- ,"//bool[@name='exists_min_f']='true'","//bool[@name='exists_max_f']='true'","//float[@name='min_f']='-42.5'",- "//float[@name='max_f']='-4.5'"+ "//float[@name='max_f']='-4.5'",// double- ,"//bool[@name='exists_min_d']='true'","//bool[@name='exists_max_d']='true'","//double[@name='min_d']='-420.5'",@@ -712,9 +700,8 @@ public class TestMinMaxOnMultiValuedField extends SolrTestCaseJ4 {"q", "*:*","fl", "id","sort", func + " " + dir),- "//*[@numFound='2']"+ "//*[@numFound='2']",// no assumptions about order for now, see bug: SOLR-8005- ,"//str[@name='id']='1'","//str[@name='id']='2'");}diff --git a/solr/core/src/test/org/apache/solr/search/json/TestJsonRequest.java b/solr/core/src/test/org/apache/solr/search/json/TestJsonRequest.javaindex 7f307b520fb..4d541dbffc6 100644--- a/solr/core/src/test/org/apache/solr/search/json/TestJsonRequest.java+++ b/solr/core/src/test/org/apache/solr/search/json/TestJsonRequest.java@@ -591,8 +591,7 @@ public class TestJsonRequest extends SolrTestCaseHS {"json",random().nextBoolean()? "{params:{ref1:'{!field f=cat_s}A'}}" // string param- : "{queries:{ref1:{field:{f:cat_s,query:A}}}}") // qdsl- ,+ : "{queries:{ref1:{field:{f:cat_s,query:A}}}}"), // qdsl"response/numFound==2");{ // shortest top level reffinal ModifiableSolrParams params = params("json", "{query:{param:'ref1'}}");diff --git a/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdatesStandalone.java b/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdatesStandalone.javaindex a63a1655122..d061e902e52 100644--- a/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdatesStandalone.java+++ b/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdatesStandalone.java@@ -510,8 +510,7 @@ public class TestInPlaceUpdatesStandalone extends SolrTestCaseJ4 {"//result/doc[1]/long[@name='regular_l'][.='999']","//result/doc[2]/long[@name='regular_l'][.='2']","//result/doc[3]/long[@name='regular_l'][.='3']",- "0=count(//result/doc[1]/float[@name='inplace_updatable_float'])" // not in new doc- ,+ "0=count(//result/doc[1]/float[@name='inplace_updatable_float'])", // not in new doc"//result/doc[2]/float[@name='inplace_updatable_float'][.='44.0']","//result/doc[3]/float[@name='inplace_updatable_float'][.='46.0']","//result/doc[1]/long[@name='_version_'][.='" + version1 + "']",diff --git a/solr/core/src/test/org/apache/solr/update/processor/AtomicUpdatesTest.java b/solr/core/src/test/org/apache/solr/update/processor/AtomicUpdatesTest.javaindex 79de49763f8..c717ec0af11 100644--- a/solr/core/src/test/org/apache/solr/update/processor/AtomicUpdatesTest.java+++ b/solr/core/src/test/org/apache/solr/update/processor/AtomicUpdatesTest.java@@ -1652,9 +1652,8 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {req("qt", "/get", "id", "7"),"count(//doc)=1","//doc/str[@name='id'][.='7']",- "//doc/int[@name='" + fieldToUpdate + "'][.='708']"+ "//doc/int[@name='" + fieldToUpdate + "'][.='708']",// whichever field we did *NOT* update- ,"//doc/int[@name!='" + fieldToUpdate + "'][.='42']","//doc/long[@name='_version_']","//doc/date[@name='timestamp']",@@ -1666,9 +1665,8 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {req("qt", "/get", "id", "7"),"count(//doc)=1","//doc/str[@name='id'][.='7']",- "//doc/int[@name='" + fieldToUpdate + "'][.='153']"+ "//doc/int[@name='" + fieldToUpdate + "'][.='153']",// whichever field we did *NOT* update- ,"//doc/int[@name!='" + fieldToUpdate + "'][.='42']","//doc/long[@name='_version_']","//doc/date[@name='timestamp']",@@ -1681,9 +1679,8 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {req("qt", "/get", "id", "8"),"count(//doc)=1","//doc/str[@name='id'][.='8']",- "//doc/int[@name='" + fieldToUpdate + "'][.='666']"+ "//doc/int[@name='" + fieldToUpdate + "'][.='666']",// whichever field we did *NOT* update- ,"//doc/int[@name!='" + fieldToUpdate + "'][.='42']","//doc/long[@name='_version_']","//doc/date[@name='timestamp']",@@ -1695,9 +1692,8 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {req("qt", "/get", "id", "8"),"count(//doc)=1","//doc/str[@name='id'][.='8']",- "//doc/int[@name='" + fieldToUpdate + "'][.='111']"+ "//doc/int[@name='" + fieldToUpdate + "'][.='111']",// whichever field we did *NOT* update- ,"//doc/int[@name!='" + fieldToUpdate + "'][.='42']","//doc/long[@name='_version_']","//doc/date[@name='timestamp']",@@ -1710,9 +1706,8 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {req("qt", "/get", "id", "7"),"count(//doc)=1","//doc/str[@name='id'][.='7']",- "//doc/int[@name='" + fieldToUpdate + "'][.='153']"+ "//doc/int[@name='" + fieldToUpdate + "'][.='153']",// whichever field we did *NOT* update- ,"//doc/int[@name!='" + fieldToUpdate + "'][.='42']","//doc/long[@name='_version_']","//doc/date[@name='timestamp']",@@ -1722,9 +1717,8 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {req("qt", "/get", "id", "8"),"count(//doc)=1","//doc/str[@name='id'][.='8']",- "//doc/int[@name='" + fieldToUpdate + "'][.='111']"+ "//doc/int[@name='" + fieldToUpdate + "'][.='111']",// whichever field we did *NOT* update- ,"//doc/int[@name!='" + fieldToUpdate + "'][.='42']","//doc/long[@name='_version_']","//doc/date[@name='timestamp']",diff --git a/solr/core/src/test/org/apache/solr/update/processor/NestedAtomicUpdateTest.java b/solr/core/src/test/org/apache/solr/update/processor/NestedAtomicUpdateTest.javaindex 3f43a080cb0..2a292fc466c 100644--- a/solr/core/src/test/org/apache/solr/update/processor/NestedAtomicUpdateTest.java+++ b/solr/core/src/test/org/apache/solr/update/processor/NestedAtomicUpdateTest.java@@ -755,9 +755,8 @@ public class NestedAtomicUpdateTest extends SolrTestCaseJ4 {assertU(commit());// a cut-n-paste of the first big query, but this time it will be retrieved from the index- // rather than the transaction log- // this requires ChildDocTransformer to get the whole block, since the document is retrieved- // using an index lookup+ // rather than the transaction log. this requires ChildDocTransformer to get the whole block,+ // since the document is retrieved using an index lookupassertJQ(req("qt", "/get", "id", "1", "fl", "id, cat_ss, child1, [child]"),"=={'doc':{'id':'1'"@@ -906,9 +905,8 @@ public class NestedAtomicUpdateTest extends SolrTestCaseJ4 {assertU(commit());// a cut-n-paste of the first big query, but this time it will be retrieved from the index- // rather than the transaction log- // this requires ChildDocTransformer to get the whole block, since the document is retrieved- // using an index lookup+ // rather than the transaction log. this requires ChildDocTransformer to get the whole block,+ // since the document is retrieved using an index lookupassertJQ(req("qt", "/get", "id", "1", "fl", "id, cat_ss, child1, [child]"),"=={'doc':{'id':'1'"@@ -938,8 +936,7 @@ public class NestedAtomicUpdateTest extends SolrTestCaseJ4 {private void testBlockAtomicSetToNullOrEmpty(boolean empty) throws Exception {// latlon field is included to ensure reading from LatLonDocValuesField is working due to atomic- // update.- // See SOLR-13966 for further details.+ // update. See SOLR-13966 for further details.SolrInputDocument sdoc2 = sdoc("id", "2", "cat_ss", "child");SolrInputDocument doc =sdoc(@@ -999,10 +996,8 @@ public class NestedAtomicUpdateTest extends SolrTestCaseJ4 {assertU(commit());// a cut-n-paste of the first big query, but this time it will be retrieved from the index- // rather than the- // transaction log- // this requires ChildDocTransformer to get the whole block, since the document is retrieved- // using an index lookup+ // rather than the transaction log. this requires ChildDocTransformer to get the whole block,+ // since the document is retrieved using an index lookupassertJQ(req("qt", "/get", "id", "1", "fl", "id, latlon, cat_ss, child1, [child]"),"=={\"doc\":{'id':\"1\", \"latlon\":\"0,0\", cat_ss:[\"aaa\",\"ccc\"]}}");diff --git a/solr/solrj/src/java/org/apache/solr/cluster/api/Resource.java b/solr/solrj/src/java/org/apache/solr/cluster/api/Resource.javaindex 96304f9075d..7a9737b4a84 100644--- a/solr/solrj/src/java/org/apache/solr/cluster/api/Resource.java+++ b/solr/solrj/src/java/org/apache/solr/cluster/api/Resource.java@@ -29,7 +29,7 @@ public interface Resource {* read a file/resource. The caller should consume the stream completely and should not hold a* reference to this stream. This method closes the stream soon after the method returns*- * @param resourceConsumer This should be a full path. e.g schema.xml , solrconfig.xml ,+ * @param resourceConsumer This should be a full path. e.g schema.xml, solrconfig.xml,* lang/stopwords.txt etc*/void get(Consumer resourceConsumer) throws SolrException;diff --git a/solr/solrj/src/java/org/apache/solr/cluster/api/SimpleMap.java b/solr/solrj/src/java/org/apache/solr/cluster/api/SimpleMap.javaindex e79bab3032b..63e18408cf6 100644--- a/solr/solrj/src/java/org/apache/solr/cluster/api/SimpleMap.java+++ b/solr/solrj/src/java/org/apache/solr/cluster/api/SimpleMap.java@@ -58,7 +58,7 @@ public interface SimpleMap<T> extends MapWriter {* iterate through all keys but abort in between if required The default impl is suboptimal.* Proper implementations must do it more efficiently*- * @param fun Consume each key and return a boolean to signal whether to proceed or not. If true ,+ * @param fun Consume each key and return a boolean to signal whether to proceed or not. If true,* continue. If false stop*/default void abortableForEachKey(Function<String, Boolean> fun) {