Apache Solr open-source search software
SOLR-11121: Randomize PointFields in schema-trie.xml and TestTrie
Chris Hostetter49ff81756d0f
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex d23bf9d152c..28c577790a7 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -519,6 +519,7 @@ Other Changes- SOLR-11113: Randomize PointFields in analysis-err-schema.xml, schema-hash.xml, and all affected tests (hossman)- SOLR-11114: Randomize PointFields in schema-customfield.xml and TestOverriddenPrefixQueryForCustomFieldType (hossman)- SOLR-11074: Randomize PointFields in cloud-dynamic configset and all related tests (Anshum Gupta)+ - SOLR-11121: Randomize PointFields in schema-trie.xml and TestTrie (hossman)* SOLR-6807: Changed requestDispatcher's handleSelect to default to false, thus ignoring "qt".Simplified configs to not refer to handleSelect or "qt". Switch all tests that assumed true to assume falsediff --git a/solr/core/src/test-files/solr/collection1/conf/schema-trie.xml b/solr/core/src/test-files/solr/collection1/conf/schema-trie.xmlindex 525ea51a02e..cc0ff03e676 100644--- a/solr/core/src/test-files/solr/collection1/conf/schema-trie.xml+++ b/solr/core/src/test-files/solr/collection1/conf/schema-trie.xml@@ -68,24 +68,24 @@field first in an ascending sort and last in a descending sort.-->- <fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>- <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>- <fieldType name="long" class="solr.TrieLongField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>- <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>+ <fieldType name="int" class="${solr.tests.IntegerFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>+ <fieldType name="float" class="${solr.tests.FloatFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>+ <fieldType name="long" class="${solr.tests.LongFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>+ <fieldType name="double" class="${solr.tests.DoubleFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>- <fieldType name="tint" class="solr.TrieIntField" omitNorms="true" positionIncrementGap="0" indexed="true"+ <fieldType name="tint" class="${solr.tests.IntegerFieldType}" docValues="${solr.tests.numeric.dv}" omitNorms="true" positionIncrementGap="0" indexed="true"stored="false"/>- <fieldType name="tfloat" class="solr.TrieFloatField" omitNorms="true" positionIncrementGap="0" indexed="true"+ <fieldType name="tfloat" class="${solr.tests.FloatFieldType}" docValues="${solr.tests.numeric.dv}" omitNorms="true" positionIncrementGap="0" indexed="true"stored="false"/>- <fieldType name="tlong" class="solr.TrieLongField" omitNorms="true" positionIncrementGap="0" indexed="true"+ <fieldType name="tlong" class="${solr.tests.LongFieldType}" docValues="${solr.tests.numeric.dv}" omitNorms="true" positionIncrementGap="0" indexed="true"stored="false"/>- <fieldType name="tdouble" class="solr.TrieDoubleField" omitNorms="true" positionIncrementGap="0" indexed="true"+ <fieldType name="tdouble" class="${solr.tests.DoubleFieldType}" docValues="${solr.tests.numeric.dv}" omitNorms="true" positionIncrementGap="0" indexed="true"stored="false"/>- <fieldType name="tdouble4" class="solr.TrieDoubleField" type="double" precisionStep="4" omitNorms="true"+ <fieldType name="tdouble4" class="${solr.tests.DoubleFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="4" omitNorms="true"positionIncrementGap="0" indexed="true" stored="false"/>- <fieldType name="tdate" class="solr.TrieDateField" omitNorms="true" positionIncrementGap="0" indexed="true"+ <fieldType name="tdate" class="${solr.tests.DateFieldType}" docValues="${solr.tests.numeric.dv}" omitNorms="true" positionIncrementGap="0" indexed="true"stored="false"/>@@ -109,7 +109,7 @@Consult the TrieDateField javadocs for more information.-->- <fieldType name="date" class="solr.TrieDateField" sortMissingLast="true" omitNorms="true"/>+ <fieldType name="date" class="${solr.tests.DateFieldType}" docValues="${solr.tests.numeric.dv}" sortMissingLast="true" omitNorms="true"/><!-- The "RandomSortField" is not used to store or search anydiff --git a/solr/core/src/test/org/apache/solr/TestTrie.java b/solr/core/src/test/org/apache/solr/TestTrie.javaindex 47c50b2e099..e7c2a33ffbe 100644--- a/solr/core/src/test/org/apache/solr/TestTrie.java+++ b/solr/core/src/test/org/apache/solr/TestTrie.java@@ -211,6 +211,11 @@ public class TestTrie extends SolrTestCaseJ4 {@Testpublic void testTrieFacet_PrecisionStep() throws Exception {+ if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) {+ assumeTrue("Skipping test: Points+facets require docValues, but randomizer: points=true && DV=false",+ Boolean.getBoolean(NUMERIC_DOCVALUES_SYSPROP));+ }+// Future protect - assert 0<precisionStep<64checkPrecisionSteps("tint");checkPrecisionSteps("tfloat");