Apache Solr open-source search software
SOLR-10864: Simplified how Trie vs Points based numerics are randomized by SolrTestCaseJ4
Chris Hostetter38f29b2674c2
diff --git a/lucene/common-build.xml b/lucene/common-build.xmlindex 327a01d8486..dba69db409a 100644--- a/lucene/common-build.xml+++ b/lucene/common-build.xml@@ -1076,7 +1076,7 @@<propertyref prefix="tests.leaveTemporary" /><propertyref prefix="tests.leavetemporary" /><propertyref prefix="solr.test.leavetmpdir" />- <propertyref prefix="solr.tests.preferPointFields"/>+ <propertyref prefix="solr.tests.use.numeric.points" /></syspropertyset><!-- Pass randomized settings to the forked JVM. -->diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex aff72dbcd27..8494aeec80d 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -305,6 +305,9 @@ Other Changes* SOLR-10929: Removed unused 'valType' option from ExternalFileField (hossman)+* SOLR-10864: Simplified how Trie vs Points based numerics are randomized by SolrTestCaseJ4 by adding a static+ option to PointsField to ignore 'precisionStep' attribute. This change also begins to attempt to randomize+ 'docValues' on numeric field types unless tests explicity enable/disable them. (hossman, Steve Rowe)================== 6.7.0 ==================diff --git a/solr/core/src/java/org/apache/solr/schema/PointField.java b/solr/core/src/java/org/apache/solr/schema/PointField.javaindex 98105af2ec8..09d0175ff77 100644--- a/solr/core/src/java/org/apache/solr/schema/PointField.java+++ b/solr/core/src/java/org/apache/solr/schema/PointField.java@@ -23,6 +23,7 @@ import java.util.Collection;import java.util.Collections;import java.util.Date;import java.util.List;+import java.util.Map;import org.apache.lucene.document.NumericDocValuesField;import org.apache.lucene.document.SortedNumericDocValuesField;@@ -56,6 +57,33 @@ import org.slf4j.LoggerFactory;public abstract class PointField extends NumericFieldType {private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());++ /**+ * <p>+ * The Test framework can set this global variable to instruct PointField that+ * (on init) it should be tollerant of the <code>precisionStep</code> argument used by TrieFields.+ * This allows for simple randomization of TrieFields and PointFields w/o extensive duplication+ * of <code><fieldType/></code> declarations.+ * </p>+ *+ * <p>NOTE: When {@link TrieField} is removed, this boolean must also be removed</p>+ *+ * @lucene.internal+ * @lucene.experimental+ */+ public static boolean TEST_HACK_IGNORE_USELESS_TRIEFIELD_ARGS = false;++ /**+ * NOTE: This method can be removed completely when+ * {@link #TEST_HACK_IGNORE_USELESS_TRIEFIELD_ARGS} is removed+ */+ @Override+ protected void init(IndexSchema schema, Map<String, String> args) {+ super.init(schema, args);+ if (TEST_HACK_IGNORE_USELESS_TRIEFIELD_ARGS) {+ args.remove("precisionStep");+ }+ }@Overridepublic boolean isPointField() {diff --git a/solr/core/src/test-files/solr/collection1/conf/schema-distrib-interval-faceting.xml b/solr/core/src/test-files/solr/collection1/conf/schema-distrib-interval-faceting.xmlindex 37da642124e..7be9b80300e 100644--- a/solr/core/src/test-files/solr/collection1/conf/schema-distrib-interval-faceting.xml+++ b/solr/core/src/test-files/solr/collection1/conf/schema-distrib-interval-faceting.xml@@ -17,40 +17,34 @@--><schema name="test" version="1.6">- <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="date" class="solr.TrieDateField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>+ <fieldType name="int" class="${solr.tests.IntegerFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>+ <fieldType name="float" class="${solr.tests.FloatFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>+ <fieldType name="long" class="${solr.tests.LongFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>+ <fieldType name="double" class="${solr.tests.DoubleFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>+ <fieldType name="date" class="${solr.tests.DateFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/><fieldType name="string" class="solr.StrField" sortMissingLast="true"/><fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"/>- <!-- Point Fields -->- <fieldType name="pint" class="solr.IntPointField" docValues="true"/>- <fieldType name="plong" class="solr.LongPointField" docValues="true"/>- <fieldType name="pdouble" class="solr.DoublePointField" docValues="true"/>- <fieldType name="pfloat" class="solr.FloatPointField" docValues="true"/>-<field name="id" type="string" indexed="true" stored="true" docValues="false" multiValued="false" required="true"/><field name="id_dv" type="string" indexed="false" stored="false" docValues="true" multiValued="false"required="true"/><dynamicField name="*_i" type="int" indexed="true" stored="false" docValues="false"/>- <dynamicField name="*_i_dv" type="${solr.tests.intClass:pint}" indexed="false" stored="false" docValues="true"/>+ <dynamicField name="*_i_dv" type="int" indexed="false" stored="false" docValues="true"/><dynamicField name="*_is" type="int" indexed="true" stored="false" docValues="false" multiValued="true"/>- <dynamicField name="*_is_dv" type="${solr.tests.intClass:pint}" indexed="false" stored="false" docValues="true" multiValued="true"/>+ <dynamicField name="*_is_dv" type="int" indexed="false" stored="false" docValues="true" multiValued="true"/><dynamicField name="*_s" type="string" indexed="true" stored="false" docValues="false"/><dynamicField name="*_s_dv" type="string" indexed="false" stored="false" docValues="true"/><dynamicField name="*_ss" type="string" indexed="true" stored="false" docValues="false" multiValued="true"/><dynamicField name="*_ss_dv" type="string" indexed="false" stored="false" docValues="true" multiValued="true"/><dynamicField name="*_f" type="float" indexed="true" stored="false" docValues="false"/>- <dynamicField name="*_f_dv" type="${solr.tests.floatClass:pfloat}" indexed="true" stored="false" docValues="true"/>- <dynamicField name="*_fs_dv" type="${solr.tests.floatClass:pfloat}" indexed="true" stored="false" docValues="true" multiValued="true"/>+ <dynamicField name="*_f_dv" type="float" indexed="true" stored="false" docValues="true"/>+ <dynamicField name="*_fs_dv" type="float" indexed="true" stored="false" docValues="true" multiValued="true"/><dynamicField name="*_l" type="long" indexed="true" stored="false" docValues="false"/>- <dynamicField name="*_l_dv" type="${solr.tests.longClass:plong}" indexed="true" stored="false" docValues="true"/>- <dynamicField name="*_ls_dv" type="${solr.tests.longClass:plong}" indexed="true" stored="false" docValues="true" multiValued="true"/>+ <dynamicField name="*_l_dv" type="long" indexed="true" stored="false" docValues="true"/>+ <dynamicField name="*_ls_dv" type="long" indexed="true" stored="false" docValues="true" multiValued="true"/><dynamicField name="*_d" type="double" indexed="true" stored="false" docValues="false"/>- <dynamicField name="*_d_dv" type="${solr.tests.doubleClass:pdouble}" indexed="true" stored="false" docValues="true"/>- <dynamicField name="*_ds_dv" type="${solr.tests.doubleClass:pdouble}" indexed="true" stored="false" docValues="true" multiValued="true"/>+ <dynamicField name="*_d_dv" type="double" indexed="true" stored="false" docValues="true"/>+ <dynamicField name="*_ds_dv" type="double" indexed="true" stored="false" docValues="true" multiValued="true"/><dynamicField name="*_dt" type="date" indexed="true" stored="false" docValues="false"/><dynamicField name="*_dt_dv" type="date" indexed="true" stored="false" docValues="true"/><dynamicField name="*_dts_dv" type="date" indexed="true" stored="false" docValues="true" multiValued="true"/>diff --git a/solr/core/src/test-files/solr/collection1/conf/schema-docValuesFaceting.xml b/solr/core/src/test-files/solr/collection1/conf/schema-docValuesFaceting.xmlindex 571d915409d..f7c6bfce064 100644--- a/solr/core/src/test-files/solr/collection1/conf/schema-docValuesFaceting.xml+++ b/solr/core/src/test-files/solr/collection1/conf/schema-docValuesFaceting.xml@@ -17,52 +17,53 @@--><schema name="test" version="1.6">- <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="date" class="solr.TrieDateField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>+ <fieldType name="int" class="${solr.tests.IntegerFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>+ <fieldType name="float" class="${solr.tests.FloatFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>+ <fieldType name="long" class="${solr.tests.LongFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>+ <fieldType name="double" class="${solr.tests.DoubleFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>+ <fieldType name="date" class="${solr.tests.DateFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>+<fieldType name="string" class="solr.StrField" sortMissingLast="true"/><fieldType name="pint" class="solr.IntPointField"/><fieldType name="plong" class="solr.LongPointField"/><fieldType name="pdouble" class="solr.DoublePointField"/><fieldType name="pfloat" class="solr.FloatPointField"/>- <fieldType name="pdate" class="solr.DatePointField"/>+ <!-- fieldType name="pdate" class="solr.DatePointField"/ --><field name="id" type="string" indexed="true" stored="true" docValues="false" multiValued="false" required="true"/><field name="id_dv" type="string" indexed="false" stored="false" docValues="true" multiValued="false"required="true"/>- <dynamicField name="*_i" type="int" indexed="true" stored="false" docValues="false"/>+ <dynamicField name="*_i" type="int" indexed="true" stored="false" docValues="${solr.tests.numeric.dv}"/><dynamicField name="*_i_dv" type="int" indexed="false" stored="false" docValues="true"/><dynamicField name="*_i_p" type="pint" indexed="true" stored="false" docValues="true"/>- <dynamicField name="*_is" type="int" indexed="true" stored="true" docValues="false" multiValued="true"/>+ <dynamicField name="*_is" type="int" indexed="true" stored="true" docValues="${solr.tests.numeric.dv}" multiValued="true"/><dynamicField name="*_is_dv" type="int" indexed="false" stored="false" docValues="true" multiValued="true"/><dynamicField name="*_is_p" type="pint" indexed="true" stored="false" docValues="true" multiValued="true"/><dynamicField name="*_s" type="string" indexed="true" stored="false" docValues="false"/><dynamicField name="*_s_dv" type="string" indexed="false" stored="false" docValues="true"/><dynamicField name="*_ss" type="string" indexed="true" stored="false" docValues="false" multiValued="true"/><dynamicField name="*_ss_dv" type="string" indexed="false" stored="false" docValues="true" multiValued="true"/>- <dynamicField name="*_f" type="float" indexed="true" stored="false" docValues="false"/>+ <dynamicField name="*_f" type="float" indexed="true" stored="false" docValues="${solr.tests.numeric.dv}"/><dynamicField name="*_f_dv" type="float" indexed="true" stored="false" docValues="true"/><dynamicField name="*_f_p" type="pfloat" indexed="true" stored="false" docValues="true"/>- <dynamicField name="*_fs" type="float" indexed="true" stored="false" docValues="false" multiValued="true"/>+ <dynamicField name="*_fs" type="float" indexed="true" stored="false" docValues="${solr.tests.numeric.dv}" multiValued="true"/><dynamicField name="*_fs_dv" type="float" indexed="true" stored="false" docValues="true" multiValued="true"/><dynamicField name="*_fs_p" type="pfloat" indexed="true" stored="false" docValues="true" multiValued="true"/>- <dynamicField name="*_l" type="long" indexed="true" stored="false" docValues="false"/>+ <dynamicField name="*_l" type="long" indexed="true" stored="false" docValues="${solr.tests.numeric.dv}"/><dynamicField name="*_l_dv" type="long" indexed="true" stored="false" docValues="true"/><dynamicField name="*_l_p" type="plong" indexed="true" stored="false" docValues="true"/>- <dynamicField name="*_ls" type="long" indexed="true" stored="false" docValues="false" multiValued="true"/>+ <dynamicField name="*_ls" type="long" indexed="true" stored="false" docValues="${solr.tests.numeric.dv}" multiValued="true"/><dynamicField name="*_ls_dv" type="long" indexed="true" stored="false" docValues="true" multiValued="true"/><dynamicField name="*_ls_p" type="plong" indexed="true" stored="false" docValues="true" multiValued="true"/>- <dynamicField name="*_d" type="double" indexed="true" stored="false" docValues="false"/>+ <dynamicField name="*_d" type="double" indexed="true" stored="false" docValues="${solr.tests.numeric.dv}"/><dynamicField name="*_d_dv" type="double" indexed="true" stored="false" docValues="true"/><dynamicField name="*_d_p" type="pdouble" indexed="true" stored="false" docValues="true"/>- <dynamicField name="*_ds" type="double" indexed="true" stored="false" docValues="false" multiValued="true"/>+ <dynamicField name="*_ds" type="double" indexed="true" stored="false" docValues="${solr.tests.numeric.dv}" multiValued="true"/><dynamicField name="*_ds_dv" type="double" indexed="true" stored="false" docValues="true" multiValued="true"/><dynamicField name="*_ds_p" type="pdouble" indexed="true" stored="false" docValues="true" multiValued="true"/>- <dynamicField name="*_dt" type="date" indexed="true" stored="false" docValues="false"/>- <dynamicField name="*_dt_dv" type="${solr.tests.dateClass:pdate}" indexed="true" stored="false" docValues="true"/>- <dynamicField name="*_dts_dv" type="${solr.tests.dateClass:pdate}" indexed="true" stored="false" docValues="true" multiValued="true"/>+ <dynamicField name="*_dt" type="date" indexed="true" stored="false" docValues="${solr.tests.numeric.dv}"/>+ <dynamicField name="*_dt_dv" type="date" indexed="true" stored="false" docValues="true"/>+ <dynamicField name="*_dts_dv" type="date" indexed="true" stored="false" docValues="true" multiValued="true"/><uniqueKey>id</uniqueKey>diff --git a/solr/core/src/test-files/solr/collection1/conf/schema-sortingresponse.xml b/solr/core/src/test-files/solr/collection1/conf/schema-sortingresponse.xmlindex 6ec93fa9c71..680a5d3da42 100644--- a/solr/core/src/test-files/solr/collection1/conf/schema-sortingresponse.xml+++ b/solr/core/src/test-files/solr/collection1/conf/schema-sortingresponse.xml@@ -18,14 +18,14 @@<schema name="schema-docValuesMulti" version="1.6">- <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"/><!-- format for date is 1995-12-31T23:59:59.999Z and only the fractionalseconds part (.999) is optional.-->- <fieldType name="date" class="solr.TrieDateField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>+ <fieldType name="date" class="${solr.tests.DateFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/><!-- Point Fields --><fieldType name="pint" class="solr.IntPointField" docValues="true"/>diff --git a/solr/core/src/test-files/solr/collection1/conf/schema-sorts.xml b/solr/core/src/test-files/solr/collection1/conf/schema-sorts.xmlindex 1ff68c1b89d..e2ba0f37d82 100644--- a/solr/core/src/test-files/solr/collection1/conf/schema-sorts.xml+++ b/solr/core/src/test-files/solr/collection1/conf/schema-sorts.xml@@ -45,37 +45,37 @@ NOTE: Tests expect every field in this schema to be sortable.<field name="int" type="int"/><field name="int_last" type="int_last"/><field name="int_first" type="int_first"/>- <field name="int_dv" type="${solr.tests.intClass:pint}_dv"/>- <field name="int_dv_last" type="${solr.tests.intClass:pint}_dv_last"/>- <field name="int_dv_first" type="${solr.tests.intClass:pint}_dv_first"/>+ <field name="int_dv" type="int_dv"/>+ <field name="int_dv_last" type="int_dv_last"/>+ <field name="int_dv_first" type="int_dv_first"/><field name="long" type="long"/><field name="long_last" type="long_last"/><field name="long_first" type="long_first"/>- <field name="long_dv" type="${solr.tests.longClass:plong}_dv"/>- <field name="long_dv_last" type="${solr.tests.longClass:plong}_dv_last"/>- <field name="long_dv_first" type="${solr.tests.longClass:plong}_dv_first"/>+ <field name="long_dv" type="long_dv"/>+ <field name="long_dv_last" type="long_dv_last"/>+ <field name="long_dv_first" type="long_dv_first"/><field name="float" type="float"/><field name="float_last" type="float_last"/><field name="float_first" type="float_first"/>- <field name="float_dv" type="${solr.tests.floatClass:pfloat}_dv"/>- <field name="float_dv_last" type="${solr.tests.floatClass:pfloat}_dv_last"/>- <field name="float_dv_first" type="${solr.tests.floatClass:pfloat}_dv_first"/>+ <field name="float_dv" type="float_dv"/>+ <field name="float_dv_last" type="float_dv_last"/>+ <field name="float_dv_first" type="float_dv_first"/><field name="double" type="double"/><field name="double_last" type="double_last"/><field name="double_first" type="double_first"/>- <field name="double_dv" type="${solr.tests.doubleClass:pdouble}_dv"/>- <field name="double_dv_last" type="${solr.tests.doubleClass:pdouble}_dv_last"/>- <field name="double_dv_first" type="${solr.tests.doubleClass:pdouble}_dv_first"/>+ <field name="double_dv" type="double_dv"/>+ <field name="double_dv_last" type="double_dv_last"/>+ <field name="double_dv_first" type="double_dv_first"/><field name="date" type="date"/><field name="date_last" type="date_last"/><field name="date_first" type="date_first"/>- <field name="date_dv" type="${solr.tests.dateClass:pdate}_dv"/>- <field name="date_dv_last" type="${solr.tests.dateClass:pdate}_dv_last"/>- <field name="date_dv_first" type="${solr.tests.dateClass:pdate}_dv_first"/>+ <field name="date_dv" type="date_dv"/>+ <field name="date_dv_last" type="date_dv_last"/>+ <field name="date_dv_first" type="date_dv_first"/><field name="uuid" type="uuid"/><field name="uuid_last" type="uuid_last"/>@@ -212,74 +212,49 @@ NOTE: Tests expect every field in this schema to be sortable.<fieldType name="bin_dv_first" class="solr.SortableBinaryField" stored="true" indexed="false" docValues="true"sortMissingFirst="true"/>- <fieldType name="int" class="solr.TrieIntField" stored="true" indexed="true"/>- <fieldType name="int_last" class="solr.TrieIntField" stored="true" indexed="true" sortMissingLast="true"/>- <fieldType name="int_first" class="solr.TrieIntField" stored="true" indexed="true" sortMissingFirst="true"/>- <fieldType name="int_dv" class="solr.TrieIntField" stored="true" indexed="false" docValues="true"/>- <fieldType name="int_dv_last" class="solr.TrieIntField" stored="true" indexed="false" docValues="true"+ <fieldType name="int" class="${solr.tests.IntegerFieldType}" stored="true" indexed="true" docValues="${solr.tests.numeric.dv}"/>+ <fieldType name="int_last" class="${solr.tests.IntegerFieldType}" stored="true" indexed="true" docValues="${solr.tests.numeric.dv}" sortMissingLast="true"/>+ <fieldType name="int_first" class="${solr.tests.IntegerFieldType}" stored="true" indexed="true" docValues="${solr.tests.numeric.dv}" sortMissingFirst="true"/>+ <fieldType name="int_dv" class="${solr.tests.IntegerFieldType}" stored="true" indexed="false" docValues="true"/>+ <fieldType name="int_dv_last" class="${solr.tests.IntegerFieldType}" stored="true" indexed="false" docValues="true"sortMissingLast="true"/>- <fieldType name="int_dv_first" class="solr.TrieIntField" stored="true" indexed="false" docValues="true"- sortMissingFirst="true"/>- <fieldType name="pint_dv" class="solr.IntPointField" stored="true" indexed="false" docValues="true"/>- <fieldType name="pint_dv_last" class="solr.IntPointField" stored="true" indexed="false" docValues="true"- sortMissingLast="true"/>- <fieldType name="pint_dv_first" class="solr.IntPointField" stored="true" indexed="false" docValues="true"+ <fieldType name="int_dv_first" class="${solr.tests.IntegerFieldType}" stored="true" indexed="false" docValues="true"sortMissingFirst="true"/>- <fieldType name="long" class="solr.TrieLongField" stored="true" indexed="true"/>- <fieldType name="long_last" class="solr.TrieLongField" stored="true" indexed="true" sortMissingLast="true"/>- <fieldType name="long_first" class="solr.TrieLongField" stored="true" indexed="true" sortMissingFirst="true"/>- <fieldType name="long_dv" class="solr.TrieLongField" stored="true" indexed="false" docValues="true"/>- <fieldType name="long_dv_last" class="solr.TrieLongField" stored="true" indexed="false" docValues="true"+ <fieldType name="long" class="${solr.tests.LongFieldType}" stored="true" indexed="true" docValues="${solr.tests.numeric.dv}"/>+ <fieldType name="long_last" class="${solr.tests.LongFieldType}" stored="true" indexed="true" docValues="${solr.tests.numeric.dv}" sortMissingLast="true"/>+ <fieldType name="long_first" class="${solr.tests.LongFieldType}" stored="true" indexed="true" docValues="${solr.tests.numeric.dv}" sortMissingFirst="true"/>+ <fieldType name="long_dv" class="${solr.tests.LongFieldType}" stored="true" indexed="false" docValues="true"/>+ <fieldType name="long_dv_last" class="${solr.tests.LongFieldType}" stored="true" indexed="false" docValues="true"sortMissingLast="true"/>- <fieldType name="long_dv_first" class="solr.TrieLongField" stored="true" indexed="false" docValues="true"- sortMissingFirst="true"/>- <fieldType name="plong_dv" class="solr.LongPointField" stored="true" indexed="false" docValues="true"/>- <fieldType name="plong_dv_last" class="solr.LongPointField" stored="true" indexed="false" docValues="true"- sortMissingLast="true"/>- <fieldType name="plong_dv_first" class="solr.LongPointField" stored="true" indexed="false" docValues="true"+ <fieldType name="long_dv_first" class="${solr.tests.LongFieldType}" stored="true" indexed="false" docValues="true"sortMissingFirst="true"/>- <fieldType name="float" class="solr.TrieFloatField" stored="true" indexed="true"/>- <fieldType name="float_last" class="solr.TrieFloatField" stored="true" indexed="true" sortMissingLast="true"/>- <fieldType name="float_first" class="solr.TrieFloatField" stored="true" indexed="true" sortMissingFirst="true"/>- <fieldType name="float_dv" class="solr.TrieFloatField" stored="true" indexed="false" docValues="true"/>- <fieldType name="float_dv_last" class="solr.TrieFloatField" stored="true" indexed="false" docValues="true"- sortMissingLast="true"/>- <fieldType name="float_dv_first" class="solr.TrieFloatField" stored="true" indexed="false" docValues="true"- sortMissingFirst="true"/>- <fieldType name="pfloat_dv" class="solr.FloatPointField" stored="true" indexed="false" docValues="true"/>- <fieldType name="pfloat_dv_last" class="solr.FloatPointField" stored="true" indexed="false" docValues="true"+ <fieldType name="float" class="${solr.tests.FloatFieldType}" stored="true" indexed="true" docValues="${solr.tests.numeric.dv}"/>+ <fieldType name="float_last" class="${solr.tests.FloatFieldType}" stored="true" indexed="true" docValues="${solr.tests.numeric.dv}" sortMissingLast="true"/>+ <fieldType name="float_first" class="${solr.tests.FloatFieldType}" stored="true" indexed="true" docValues="${solr.tests.numeric.dv}" sortMissingFirst="true"/>+ <fieldType name="float_dv" class="${solr.tests.FloatFieldType}" stored="true" indexed="false" docValues="true"/>+ <fieldType name="float_dv_last" class="${solr.tests.FloatFieldType}" stored="true" indexed="false" docValues="true"sortMissingLast="true"/>- <fieldType name="pfloat_dv_first" class="solr.FloatPointField" stored="true" indexed="false" docValues="true"+ <fieldType name="float_dv_first" class="${solr.tests.FloatFieldType}" stored="true" indexed="false" docValues="true"sortMissingFirst="true"/>- <fieldType name="double" class="solr.TrieDoubleField" stored="true" indexed="true"/>- <fieldType name="double_last" class="solr.TrieDoubleField" stored="true" indexed="true" sortMissingLast="true"/>- <fieldType name="double_first" class="solr.TrieDoubleField" stored="true" indexed="true" sortMissingFirst="true"/>- <fieldType name="double_dv" class="solr.TrieDoubleField" stored="true" indexed="false" docValues="true"/>- <fieldType name="double_dv_last" class="solr.TrieDoubleField" stored="true" indexed="false" docValues="true"- sortMissingLast="true"/>- <fieldType name="double_dv_first" class="solr.TrieDoubleField" stored="true" indexed="false" docValues="true"- sortMissingFirst="true"/>- <fieldType name="pdouble_dv" class="solr.DoublePointField" stored="true" indexed="false" docValues="true"/>- <fieldType name="pdouble_dv_last" class="solr.DoublePointField" stored="true" indexed="false" docValues="true"+ <fieldType name="double" class="${solr.tests.DoubleFieldType}" stored="true" indexed="true" docValues="${solr.tests.numeric.dv}"/>+ <fieldType name="double_last" class="${solr.tests.DoubleFieldType}" stored="true" indexed="true" docValues="${solr.tests.numeric.dv}" sortMissingLast="true"/>+ <fieldType name="double_first" class="${solr.tests.DoubleFieldType}" stored="true" indexed="true" docValues="${solr.tests.numeric.dv}" sortMissingFirst="true"/>+ <fieldType name="double_dv" class="${solr.tests.DoubleFieldType}" stored="true" indexed="false" docValues="true"/>+ <fieldType name="double_dv_last" class="${solr.tests.DoubleFieldType}" stored="true" indexed="false" docValues="true"sortMissingLast="true"/>- <fieldType name="pdouble_dv_first" class="solr.DoublePointField" stored="true" indexed="false" docValues="true"+ <fieldType name="double_dv_first" class="${solr.tests.DoubleFieldType}" stored="true" indexed="false" docValues="true"sortMissingFirst="true"/>- <fieldType name="date" class="solr.TrieDateField" stored="true" indexed="true"/>- <fieldType name="date_last" class="solr.TrieDateField" stored="true" indexed="true" sortMissingLast="true"/>- <fieldType name="date_first" class="solr.TrieDateField" stored="true" indexed="true" sortMissingFirst="true"/>- <fieldType name="date_dv" class="solr.TrieDateField" stored="true" indexed="false" docValues="true"/>- <fieldType name="date_dv_last" class="solr.TrieDateField" stored="true" indexed="false" docValues="true"- sortMissingLast="true"/>- <fieldType name="date_dv_first" class="solr.TrieDateField" stored="true" indexed="false" docValues="true"- sortMissingFirst="true"/>- <fieldType name="pdate_dv" class="solr.DatePointField" stored="true" indexed="false" docValues="true"/>- <fieldType name="pdate_dv_last" class="solr.DatePointField" stored="true" indexed="false" docValues="true"+ <fieldType name="date" class="${solr.tests.DateFieldType}" stored="true" indexed="true" docValues="${solr.tests.numeric.dv}"/>+ <fieldType name="date_last" class="${solr.tests.DateFieldType}" stored="true" indexed="true" docValues="${solr.tests.numeric.dv}" sortMissingLast="true"/>+ <fieldType name="date_first" class="${solr.tests.DateFieldType}" stored="true" indexed="true" docValues="${solr.tests.numeric.dv}" sortMissingFirst="true"/>+ <fieldType name="date_dv" class="${solr.tests.DateFieldType}" stored="true" indexed="false" docValues="true"/>+ <fieldType name="date_dv_last" class="${solr.tests.DateFieldType}" stored="true" indexed="false" docValues="true"sortMissingLast="true"/>- <fieldType name="pdate_dv_first" class="solr.DatePointField" stored="true" indexed="false" docValues="true"+ <fieldType name="date_dv_first" class="${solr.tests.DateFieldType}" stored="true" indexed="false" docValues="true"sortMissingFirst="true"/><fieldType name="uuid" class="solr.UUIDField" stored="true" indexed="true"/>diff --git a/solr/core/src/test-files/solr/collection1/conf/schema.xml b/solr/core/src/test-files/solr/collection1/conf/schema.xmlindex 685ee687630..23c104547f8 100644--- a/solr/core/src/test-files/solr/collection1/conf/schema.xml+++ b/solr/core/src/test-files/solr/collection1/conf/schema.xml@@ -33,16 +33,16 @@behavior of the fieldType.-->- <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" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>- <fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>- <fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>- <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>+ <fieldType name="tint" class="${solr.tests.IntegerFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>+ <fieldType name="tfloat" class="${solr.tests.FloatFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>+ <fieldType name="tlong" class="${solr.tests.LongFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>+ <fieldType name="tdouble" class="${solr.tests.DoubleFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="8" omitNorms="true" positionIncrementGap="0"/><!-- Point Fields --><fieldType name="pint" class="solr.IntPointField" docValues="true"/>@@ -50,7 +50,7 @@<fieldType name="pdouble" class="solr.DoublePointField" docValues="true"/><fieldType name="pfloat" class="solr.FloatPointField" docValues="true"/><fieldType name="pdate" class="solr.DatePointField" docValues="true"/>-+<!-- Field type demonstrating an Analyzer failure --><fieldType name="failtype1" class="solr.TextField"><analyzer type="index">@@ -105,9 +105,9 @@<!-- format for date is 1995-12-31T23:59:59.999Z and only the fractionalseconds part (.999) is optional.-->- <fieldType name="date" class="solr.TrieDateField" precisionStep="0"/>- <fieldType name="tdate" class="solr.TrieDateField" precisionStep="6"/>- <fieldType name="tdatedv" class="solr.TrieDateField" precisionStep="6" docValues="true"/>+ <fieldType name="date" class="${solr.tests.DateFieldType}" precisionStep="0" docValues="${solr.tests.numeric.dv}"/>+ <fieldType name="tdate" class="${solr.tests.DateFieldType}" precisionStep="6" docValues="${solr.tests.numeric.dv}"/>+ <fieldType name="tdatedv" class="${solr.tests.DateFieldType}" precisionStep="6" docValues="true"/><fieldType name="dateRange" class="solr.DateRangeField"/><fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType"@@ -433,14 +433,14 @@<fieldType name="uuid" class="solr.UUIDField"/><!-- Try out some point types -->- <fieldType name="xy" class="solr.PointType" dimension="2" subFieldType="${solr.tests.doubleClass:pdouble}" docValues="true"/>- <fieldType name="x" class="solr.PointType" dimension="1" subFieldType="${solr.tests.doubleClass:pdouble}"/>- <fieldType name="tenD" class="solr.PointType" dimension="10" subFieldType="${solr.tests.doubleClass:pdouble}"/>+ <fieldType name="xy" class="solr.PointType" dimension="2" subFieldType="double" docValues="true"/>+ <fieldType name="x" class="solr.PointType" dimension="1" subFieldType="double"/>+ <fieldType name="tenD" class="solr.PointType" dimension="10" subFieldType="double"/><fieldType name="xyd" class="solr.PointType" dimension="2" subFieldSuffix="_d1"/><fieldType name="geohash" class="solr.GeoHashField"/>- <fieldType name="latLon" class="solr.LatLonType" subFieldType="${solr.tests.doubleClass:pdouble}"/>+ <fieldType name="latLon" class="solr.LatLonType" subFieldType="double"/><!-- Currency type --><fieldType name="currency" class="solr.CurrencyField" currencyConfig="currency.xml" multiValued="false"/>@@ -597,7 +597,7 @@<field name="dateRange" type="dateRange" multiValued="true"/><field name="cat" type="string" indexed="true" stored="true" multiValued="true"/>- <field name="price" type="${solr.tests.floatClass:pfloat}" indexed="true" stored="true" multiValued="false"/>+ <field name="price" type="float" indexed="true" stored="true" multiValued="false"/><field name="inStock" type="boolean" indexed="true" stored="true"/><field name="subword" type="subword" indexed="true" stored="true"/>@@ -610,19 +610,19 @@<field name="textgap" type="textgap" indexed="true" stored="true"/>- <field name="timestamp" type="${solr.tests.dateClass:pdate}" indexed="true" stored="true" docValues="true" default="NOW" multiValued="false"/>+ <field name="timestamp" type="date" indexed="true" stored="true" docValues="true" default="NOW" multiValued="false"/><field name="multiDefault" type="string" indexed="true" stored="true" default="muLti-Default" multiValued="true"/>- <field name="intDefault" type="${solr.tests.intClass:pint}" indexed="true" stored="true" default="42" multiValued="false"/>- <field name="intDvoDefault" type="${solr.tests.intClass:pint}" indexed="false" stored="false" multiValued="false"+ <field name="intDefault" type="int" indexed="true" stored="true" default="42" multiValued="false"/>+ <field name="intDvoDefault" type="int" indexed="false" stored="false" multiValued="false"useDocValuesAsStored="true" docValues="true" default="42" />- <field name="intRemove" type="${solr.tests.intClass:pint}" indexed="true" stored="true" multiValued="true"/>- <field name="dateRemove" type="${solr.tests.dateClass:pdate}" indexed="true" stored="true" multiValued="true"/>- <field name="floatRemove" type="${solr.tests.floatClass:pfloat}" indexed="true" stored="true" multiValued="true"/>+ <field name="intRemove" type="int" indexed="true" stored="true" multiValued="true"/>+ <field name="dateRemove" type="date" indexed="true" stored="true" multiValued="true"/>+ <field name="floatRemove" type="float" indexed="true" stored="true" multiValued="true"/><field name="nopositionstext" type="nopositions" indexed="true" stored="true"/><field name="tlong" type="tlong" indexed="true" stored="true"/>- <field name="_version_" type="${solr.tests.longClass:plong}" indexed="false" stored="false" docValues="true" multiValued="false" useDocValuesAsStored="true"/>+ <field name="_version_" type="long" indexed="false" stored="false" docValues="true" multiValued="false" useDocValuesAsStored="true"/><field name="title_stringNoNorms" type="string" omitNorms="true" indexed="true" stored="true"/>@@ -647,23 +647,23 @@--><dynamicField name="*_i" type="int" indexed="true" stored="true"/><dynamicField name="*_i1" type="int" indexed="true" stored="true" multiValued="false" sortMissingLast="true"/>- <dynamicField name="*_idv" type="${solr.tests.intClass:pint}" indexed="true" stored="true" docValues="true" multiValued="false"/>+ <dynamicField name="*_idv" type="int" indexed="true" stored="true" docValues="true" multiValued="false"/><dynamicField name="*_s" type="string" indexed="true" stored="true"/><dynamicField name="*_s1" type="string" indexed="true" stored="true" multiValued="false"/>- <dynamicField name="*_l" type="${solr.tests.longClass:plong}" indexed="true" stored="true"/>- <dynamicField name="*_l1" type="${solr.tests.longClass:plong}" indexed="true" stored="true" multiValued="false"/>+ <dynamicField name="*_l" type="long" indexed="true" stored="true"/>+ <dynamicField name="*_l1" type="long" indexed="true" stored="true" multiValued="false"/><dynamicField name="*_t" type="text" indexed="true" stored="true"/><dynamicField name="*_b" type="boolean" indexed="true" stored="true"/><dynamicField name="*_b1" type="boolean" indexed="true" stored="true" multiValued="false"/>- <dynamicField name="*_f" type="${solr.tests.floatClass:pfloat}" indexed="true" stored="true"/>- <dynamicField name="*_f1" type="${solr.tests.floatClass:pfloat}" indexed="true" stored="true" multiValued="false"/>- <dynamicField name="*_d" type="${solr.tests.doubleClass:pdouble}" indexed="true" stored="true"/>- <dynamicField name="*_d1" type="${solr.tests.doubleClass:pdouble}" indexed="true" stored="true" multiValued="false"/>- <dynamicField name="*_d1_dv" type="${solr.tests.doubleClass:pdouble}" indexed="true" docValues="true" stored="true" multiValued="false"/>- <dynamicField name="*_dt" type="${solr.tests.dateClass:pdate}" indexed="true" stored="true"/>- <dynamicField name="*_dt1" type="${solr.tests.dateClass:pdate}" indexed="true" stored="true" multiValued="false"/>+ <dynamicField name="*_f" type="float" indexed="true" stored="true"/>+ <dynamicField name="*_f1" type="float" indexed="true" stored="true" multiValued="false"/>+ <dynamicField name="*_d" type="double" indexed="true" stored="true"/>+ <dynamicField name="*_d1" type="double" indexed="true" stored="true" multiValued="false"/>+ <dynamicField name="*_d1_dv" type="double" indexed="true" docValues="true" stored="true" multiValued="false"/>+ <dynamicField name="*_dt" type="date" indexed="true" stored="true"/>+ <dynamicField name="*_dt1" type="date" indexed="true" stored="true" multiValued="false"/><!-- some trie-coded dynamic fields for faster range queries -->@@ -711,7 +711,7 @@<dynamicField name="*_mfacet" type="string" indexed="true" stored="false" multiValued="true"/><!-- Type used to index the lat and lon components for the "location" FieldType -->- <dynamicField name="*_coordinate" type="${solr.tests.doubleClass:pdouble}" indexed="true" stored="false" omitNorms="true" docValues="false"/>+ <dynamicField name="*_coordinate" type="double" indexed="true" stored="false" omitNorms="true" docValues="false"/><dynamicField name="*_path" type="path" indexed="true" stored="true" omitNorms="true" multiValued="true"/><dynamicField name="*_ancestor" type="ancestor_path" indexed="true" stored="true" omitNorms="true"@@ -720,47 +720,47 @@<dynamicField name="*_sev_enum" type="severityType" indexed="true" stored="true" docValues="true" multiValued="true"/><!-- With DocValues=true -->- <dynamicField name="*_i_dv" type="${solr.tests.intClass:pint}" indexed="true" stored="true" docValues="true"/>- <dynamicField name="*_l_dv" type="${solr.tests.longClass:plong}" indexed="true" stored="true" docValues="true"/>- <dynamicField name="*_f_dv" type="${solr.tests.floatClass:pfloat}" indexed="true" stored="true" docValues="true"/>- <dynamicField name="*_d_dv" type="${solr.tests.doubleClass:pdouble}" indexed="true" stored="true" docValues="true"/>- <dynamicField name="*_dt_dv" type="${solr.tests.dateClass:pdate}" indexed="true" stored="true" docValues="true"/>- <dynamicField name="*_f1_dv" type="${solr.tests.floatClass:pfloat}" indexed="true" stored="true" docValues="true" multiValued="false"/>+ <dynamicField name="*_i_dv" type="int" indexed="true" stored="true" docValues="true"/>+ <dynamicField name="*_l_dv" type="long" indexed="true" stored="true" docValues="true"/>+ <dynamicField name="*_f_dv" type="float" indexed="true" stored="true" docValues="true"/>+ <dynamicField name="*_d_dv" type="double" indexed="true" stored="true" docValues="true"/>+ <dynamicField name="*_dt_dv" type="date" indexed="true" stored="true" docValues="true"/>+ <dynamicField name="*_f1_dv" type="float" indexed="true" stored="true" docValues="true" multiValued="false"/><!-- Non-stored, DocValues=true -->- <dynamicField name="*_i_dvo" multiValued="false" type="${solr.tests.intClass:pint}" docValues="true" indexed="false" stored="false"+ <dynamicField name="*_i_dvo" multiValued="false" type="int" docValues="true" indexed="false" stored="false"useDocValuesAsStored="true"/>- <dynamicField name="*_d_dvo" multiValued="false" type="${solr.tests.doubleClass:pdouble}" docValues="true" indexed="false" stored="false"+ <dynamicField name="*_d_dvo" multiValued="false" type="double" docValues="true" indexed="false" stored="false"useDocValuesAsStored="true"/><dynamicField name="*_s_dvo" multiValued="false" type="string" docValues="true" indexed="false" stored="false"useDocValuesAsStored="true"/>- <dynamicField name="*_l_dvo" multiValued="false" type="${solr.tests.longClass:plong}" docValues="true" indexed="false" stored="false"+ <dynamicField name="*_l_dvo" multiValued="false" type="long" docValues="true" indexed="false" stored="false"useDocValuesAsStored="true"/>- <dynamicField name="*_f_dvo" multiValued="false" type="${solr.tests.floatClass:pfloat}" docValues="true" indexed="false" stored="false"+ <dynamicField name="*_f_dvo" multiValued="false" type="float" docValues="true" indexed="false" stored="false"useDocValuesAsStored="true"/>- <dynamicField name="*_dt_dvo" multiValued="false" type="${solr.tests.dateClass:pdate}" docValues="true" indexed="false" stored="false"+ <dynamicField name="*_dt_dvo" multiValued="false" type="date" docValues="true" indexed="false" stored="false"useDocValuesAsStored="true"/>- <dynamicField name="*_ii_dvo" multiValued="true" type="${solr.tests.intClass:pint}" docValues="true" indexed="false" stored="false"+ <dynamicField name="*_ii_dvo" multiValued="true" type="int" docValues="true" indexed="false" stored="false"useDocValuesAsStored="true"/>- <dynamicField name="*_dd_dvo" multiValued="true" type="${solr.tests.doubleClass:pdouble}" docValues="true" indexed="false" stored="false"+ <dynamicField name="*_dd_dvo" multiValued="true" type="double" docValues="true" indexed="false" stored="false"useDocValuesAsStored="true"/><!-- Only Stored numerics -->- <dynamicField name="*_i_os" type="${solr.tests.intClass:pint}" indexed="false" stored="true" docValues="false"/>- <dynamicField name="*_l_os" type="${solr.tests.longClass:plong}" indexed="false" stored="true" docValues="false"/>- <dynamicField name="*_f_os" type="${solr.tests.floatClass:pfloat}" indexed="false" stored="true" docValues="false"/>- <dynamicField name="*_d_os" type="${solr.tests.doubleClass:pdouble}" indexed="false" stored="true" docValues="false"/>- <dynamicField name="*_dt_os" type="${solr.tests.dateClass:pdate}" indexed="false" stored="true" docValues="false"/>+ <dynamicField name="*_i_os" type="int" indexed="false" stored="true" docValues="false"/>+ <dynamicField name="*_l_os" type="long" indexed="false" stored="true" docValues="false"/>+ <dynamicField name="*_f_os" type="float" indexed="false" stored="true" docValues="false"/>+ <dynamicField name="*_d_os" type="double" indexed="false" stored="true" docValues="false"/>+ <dynamicField name="*_dt_os" type="date" indexed="false" stored="true" docValues="false"/><!-- Non-stored, DocValues=true, useDocValuesAsStored=false -->- <field name="single_i_dvn" multiValued="false" type="${solr.tests.intClass:pint}" indexed="true" stored="true"/>- <field name="single_d_dvn" multiValued="false" type="${solr.tests.doubleClass:pdouble}" indexed="true" stored="true"/>+ <field name="single_i_dvn" multiValued="false" type="int" indexed="true" stored="true"/>+ <field name="single_d_dvn" multiValued="false" type="double" indexed="true" stored="true"/><field name="single_s_dvn" multiValued="false" type="string" indexed="true" stored="true"/>- <field name="copy_single_i_dvn" multiValued="false" type="${solr.tests.intClass:pint}" docValues="true" indexed="true" stored="false"+ <field name="copy_single_i_dvn" multiValued="false" type="int" docValues="true" indexed="true" stored="false"useDocValuesAsStored="false"/>- <field name="copy_single_d_dvn" multiValued="false" type="${solr.tests.doubleClass:pdouble}" docValues="true" indexed="true" stored="false"+ <field name="copy_single_d_dvn" multiValued="false" type="double" docValues="true" indexed="true" stored="false"useDocValuesAsStored="false"/><field name="copy_single_s_dvn" multiValued="false" type="string" docValues="true" indexed="true" stored="false"useDocValuesAsStored="false"/>diff --git a/solr/core/src/test-files/solr/collection1/conf/schema11.xml b/solr/core/src/test-files/solr/collection1/conf/schema11.xmlindex 487a65cce8e..647e1ef79c6 100644--- a/solr/core/src/test-files/solr/collection1/conf/schema11.xml+++ b/solr/core/src/test-files/solr/collection1/conf/schema11.xml@@ -73,10 +73,10 @@<!--Default numeric field types. For faster range queries, consider the tint/tfloat/tlong/tdouble types.-->- <fieldType name="int" class="solr.TrieIntField" precisionStep="0" positionIncrementGap="0"/>- <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" positionIncrementGap="0"/>- <fieldType name="long" class="solr.TrieLongField" precisionStep="0" positionIncrementGap="0"/>- <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" positionIncrementGap="0"/>+ <fieldType name="int" class="${solr.tests.IntegerFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" positionIncrementGap="0"/>+ <fieldType name="float" class="${solr.tests.FloatFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" positionIncrementGap="0"/>+ <fieldType name="long" class="${solr.tests.LongFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" positionIncrementGap="0"/>+ <fieldType name="double" class="${solr.tests.DoubleFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" positionIncrementGap="0"/><!-- Point Fields --><fieldType name="pint" class="solr.IntPointField" docValues="true"/>@@ -105,7 +105,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 any@@ -249,20 +249,21 @@<fieldType name="sfile" keyField="sfile_s" defVal="1" stored="false" indexed="false" class="solr.ExternalFileField" />-- <fieldType name="tint" class="solr.TrieIntField" omitNorms="true" positionIncrementGap="0"/>- <fieldType name="tfloat" class="solr.TrieFloatField" omitNorms="true" positionIncrementGap="0"/>- <fieldType name="tlong" class="solr.TrieLongField" omitNorms="true" positionIncrementGap="0"/>- <fieldType name="tdouble" class="solr.TrieDoubleField" omitNorms="true" positionIncrementGap="0"/>- <fieldType name="tdouble4" class="solr.TrieDoubleField" precisionStep="4" omitNorms="true" positionIncrementGap="0"/>- <fieldType name="tdate" class="solr.TrieDateField" omitNorms="true" positionIncrementGap="0"/>--- <fieldType name="tints" class="solr.TrieIntField" omitNorms="true" positionIncrementGap="0" precisionStep="0" multiValued="true" />- <fieldType name="tfloats" class="solr.TrieFloatField" omitNorms="true" positionIncrementGap="0" precisionStep="0" multiValued="true"/>- <fieldType name="tlongs" class="solr.TrieLongField" omitNorms="true" positionIncrementGap="0" precisionStep="0" multiValued="true"/>- <fieldType name="tdoubles" class="solr.TrieDoubleField" omitNorms="true" positionIncrementGap="0" precisionStep="0" multiValued="true" />- <fieldType name="tdates" class="solr.TrieDateField" omitNorms="true" positionIncrementGap="0" precisionStep="0" multiValued="true" />++ <fieldType name="tint" class="${solr.tests.IntegerFieldType}" docValues="${solr.tests.numeric.dv}" omitNorms="true" positionIncrementGap="0"/>+ <fieldType name="tfloat" class="${solr.tests.FloatFieldType}" docValues="${solr.tests.numeric.dv}" omitNorms="true" positionIncrementGap="0"/>+ <fieldType name="tlong" class="${solr.tests.LongFieldType}" docValues="${solr.tests.numeric.dv}" omitNorms="true" positionIncrementGap="0"/>+ <fieldType name="tdouble" class="${solr.tests.DoubleFieldType}" docValues="${solr.tests.numeric.dv}" omitNorms="true" positionIncrementGap="0"/>+ <fieldType name="tdouble4" class="${solr.tests.DoubleFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="4" omitNorms="true" positionIncrementGap="0"/>+ <fieldType name="tdate" class="${solr.tests.DateFieldType}" docValues="${solr.tests.numeric.dv}" omitNorms="true" positionIncrementGap="0"/>+++ <fieldType name="tints" class="${solr.tests.IntegerFieldType}" docValues="${solr.tests.numeric.dv}" omitNorms="true" positionIncrementGap="0" precisionStep="0" multiValued="true" />+ <fieldType name="tfloats" class="${solr.tests.FloatFieldType}" docValues="${solr.tests.numeric.dv}" omitNorms="true" positionIncrementGap="0" precisionStep="0" multiValued="true"/>+ <fieldType name="tlongs" class="${solr.tests.LongFieldType}" docValues="${solr.tests.numeric.dv}" omitNorms="true" positionIncrementGap="0" precisionStep="0" multiValued="true"/>+ <fieldType name="tdoubles" class="${solr.tests.DoubleFieldType}" docValues="${solr.tests.numeric.dv}" omitNorms="true" positionIncrementGap="0" precisionStep="0" multiValued="true" />+ <fieldType name="tdates" class="${solr.tests.DateFieldType}" docValues="${solr.tests.numeric.dv}" omitNorms="true" positionIncrementGap="0" precisionStep="0" multiValued="true" />+<!-- Poly field --><fieldType name="xy" class="solr.PointType" dimension="2" subFieldType="double"/>@@ -327,12 +328,12 @@ valued. --><field name="text_no_analyzer" type="text_no_analyzer" indexed="true" />- <field name="_version_" type="${solr.tests.longClass:plong}" indexed="true" stored="true" multiValued="false" />+ <field name="_version_" type="long" indexed="true" stored="true" multiValued="false" /><field name="cat" type="string" indexed="true" stored="true" multiValued="true"/><field name="cat_docValues" type="string" indexed="true" stored="true" docValues="true" multiValued="true" />- <field name="cat_intDocValues" type="${solr.tests.intClass:pint}" indexed="true" stored="true" docValues="true" multiValued="true" />- <field name="cat_floatDocValues" type="${solr.tests.floatClass:pfloat}" indexed="true" stored="true" docValues="true" multiValued="true" />+ <field name="cat_intDocValues" type="int" indexed="true" stored="true" docValues="true" multiValued="true" />+ <field name="cat_floatDocValues" type="float" indexed="true" stored="true" docValues="true" multiValued="true" /><field name="cat_length" type="text_length" indexed="true" stored="true" multiValued="true"/>@@ -350,11 +351,11 @@ valued. --><dynamicField name="*_s_dv" type="string" indexed="true" stored="true" docValues="true"/><dynamicField name="*_ss" type="string" indexed="true" stored="true" multiValued="true"/><dynamicField name="*_sS" type="string" indexed="false" stored="true"/>- <dynamicField name="*_i" type="${solr.tests.intClass:pint}" indexed="true" stored="true"/>- <dynamicField name="*_ii" type="${solr.tests.intClass:pint}" indexed="true" stored="true" multiValued="true"/>- <dynamicField name="*_l" type="${solr.tests.longClass:plong}" indexed="true" stored="true"/>- <dynamicField name="*_f" type="${solr.tests.floatClass:pfloat}" indexed="true" stored="true"/>- <dynamicField name="*_d" type="${solr.tests.doubleClass:pdouble}" indexed="true" stored="true"/>+ <dynamicField name="*_i" type="int" indexed="true" stored="true"/>+ <dynamicField name="*_ii" type="int" indexed="true" stored="true" multiValued="true"/>+ <dynamicField name="*_l" type="long" indexed="true" stored="true"/>+ <dynamicField name="*_f" type="float" indexed="true" stored="true"/>+ <dynamicField name="*_d" type="double" indexed="true" stored="true"/><!-- Test trie fields explicitly --><dynamicField name="*_ti" type="tint" indexed="true" stored="true"/>@@ -415,7 +416,7 @@ valued. --><dynamicField name="*_t" type="text" indexed="true" stored="true"/><dynamicField name="*_b" type="boolean" indexed="true" stored="true"/>- <dynamicField name="*_dt" type="${solr.tests.dateClass:pdate}" indexed="true" stored="true"/>+ <dynamicField name="*_dt" type="date" indexed="true" stored="true"/><dynamicField name="*_ws" type="text_ws" indexed="true" stored="true"/><!-- for testing tfidf functions, see TestFunctionQuery.testTFIDFFunctions -->diff --git a/solr/core/src/test-files/solr/collection1/conf/schema12.xml b/solr/core/src/test-files/solr/collection1/conf/schema12.xmlindex 22363952b1a..03af542d9ea 100644--- a/solr/core/src/test-files/solr/collection1/conf/schema12.xml+++ b/solr/core/src/test-files/solr/collection1/conf/schema12.xml@@ -33,16 +33,16 @@behavior of the fieldType.-->- <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="tint" class="solr.TrieIntField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>- <fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>- <fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>- <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" 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.tests.IntegerFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>+ <fieldType name="tfloat" class="${solr.tests.FloatFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>+ <fieldType name="tlong" class="${solr.tests.LongFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>+ <fieldType name="tdouble" class="${solr.tests.DoubleFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>+<!-- Point Fields --><fieldType name="pint" class="solr.IntPointField" docValues="true"/><fieldType name="plong" class="solr.LongPointField" docValues="true"/>@@ -104,8 +104,8 @@<!-- format for date is 1995-12-31T23:59:59.999Z and only the fractionalseconds part (.999) is optional.-->- <fieldType name="date" class="solr.TrieDateField" sortMissingLast="true"/>- <fieldType name="tdate" class="solr.TrieDateField" sortMissingLast="true" precisionStep="6"/>+ <fieldType name="date" class="${solr.tests.DateFieldType}" docValues="${solr.tests.numeric.dv}" sortMissingLast="true"/>+ <fieldType name="tdate" class="${solr.tests.DateFieldType}" docValues="${solr.tests.numeric.dv}" sortMissingLast="true" precisionStep="6"/><fieldType name="text" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true"><analyzer type="index">@@ -482,7 +482,7 @@<field name="text" type="text" indexed="true" stored="false"/><field name="subject" type="text" indexed="true" stored="true"/><field name="title" type="nametext" indexed="true" stored="true"/>- <field name="weight" type="${solr.tests.floatClass:pfloat}" indexed="true" stored="true"/>+ <field name="weight" type="float" indexed="true" stored="true"/><field name="bday" type="date" indexed="true" stored="true"/><field name="text_np" type="text_np" indexed="true" stored="false"/>@@ -502,8 +502,8 @@<field name="bind" type="boolean" indexed="true" stored="false"/><field name="bsto" type="boolean" indexed="false" stored="true"/><field name="bindsto" type="boolean" indexed="true" stored="true"/>- <field name="isto" type="${solr.tests.intClass:pint}" indexed="false" stored="true"/>- <field name="iind" type="${solr.tests.intClass:pint}" indexed="true" stored="false"/>+ <field name="isto" type="int" indexed="false" stored="true"/>+ <field name="iind" type="int" indexed="true" stored="false"/><field name="ssto" type="string" indexed="false" stored="true"/><field name="sind" type="string" indexed="true" stored="false"/><field name="sindsto" type="string" indexed="true" stored="true"/>@@ -600,29 +600,29 @@<dynamicField name="*_sw" type="text_sw" indexed="true" stored="true" multiValued="true"/>- <dynamicField name="*_i" type="${solr.tests.intClass:pint}" indexed="true" stored="true"/>- <dynamicField name="*_is" type="${solr.tests.intClass:pint}" indexed="true" stored="true" multiValued="true"/>- <dynamicField name="*_i_dv" type="${solr.tests.intClass:pint}" indexed="true" stored="true" docValues="true" multiValued="false"/>- <dynamicField name="*_is_dv" type="${solr.tests.intClass:pint}" indexed="true" stored="true" docValues="true" multiValued="true"/>- <dynamicField name="*_i_dvo" type="${solr.tests.intClass:pint}" indexed="false" stored="true" docValues="true"/>+ <dynamicField name="*_i" type="int" indexed="true" stored="true"/>+ <dynamicField name="*_is" type="int" indexed="true" stored="true" multiValued="true"/>+ <dynamicField name="*_i_dv" type="int" indexed="true" stored="true" docValues="true" multiValued="false"/>+ <dynamicField name="*_is_dv" type="int" indexed="true" stored="true" docValues="true" multiValued="true"/>+ <dynamicField name="*_i_dvo" type="int" indexed="false" stored="true" docValues="true"/>- <dynamicField name="*_f" type="${solr.tests.floatClass:pfloat}" indexed="true" stored="true"/>- <dynamicField name="*_fs" type="${solr.tests.floatClass:pfloat}" indexed="true" stored="true" multiValued="true"/>- <dynamicField name="*_f_dv" type="${solr.tests.floatClass:pfloat}" indexed="true" stored="true" docValues="true" multiValued="false"/>- <dynamicField name="*_fs_dv" type="${solr.tests.floatClass:pfloat}" indexed="true" stored="true" docValues="true" multiValued="true"/>- <dynamicField name="*_f_dvo" type="${solr.tests.floatClass:pfloat}" indexed="false" stored="true" docValues="true"/>+ <dynamicField name="*_f" type="float" indexed="true" stored="true"/>+ <dynamicField name="*_fs" type="float" indexed="true" stored="true" multiValued="true"/>+ <dynamicField name="*_f_dv" type="float" indexed="true" stored="true" docValues="true" multiValued="false"/>+ <dynamicField name="*_fs_dv" type="float" indexed="true" stored="true" docValues="true" multiValued="true"/>+ <dynamicField name="*_f_dvo" type="float" indexed="false" stored="true" docValues="true"/>- <dynamicField name="*_l" type="${solr.tests.longClass:plong}" indexed="true" stored="true"/>- <dynamicField name="*_ls" type="${solr.tests.longClass:plong}" indexed="true" stored="true" multiValued="true"/>- <dynamicField name="*_l_dv" type="${solr.tests.longClass:plong}" indexed="true" stored="true" docValues="true" multiValued="false"/>- <dynamicField name="*_ls_dv" type="${solr.tests.longClass:plong}" indexed="true" stored="true" docValues="true" multiValued="true"/>- <dynamicField name="*_l_dvo" type="${solr.tests.longClass:plong}" indexed="false" stored="true" docValues="true"/>+ <dynamicField name="*_l" type="long" indexed="true" stored="true"/>+ <dynamicField name="*_ls" type="long" indexed="true" stored="true" multiValued="true"/>+ <dynamicField name="*_l_dv" type="long" indexed="true" stored="true" docValues="true" multiValued="false"/>+ <dynamicField name="*_ls_dv" type="long" indexed="true" stored="true" docValues="true" multiValued="true"/>+ <dynamicField name="*_l_dvo" type="long" indexed="false" stored="true" docValues="true"/>- <dynamicField name="*_d" type="${solr.tests.doubleClass:pdouble}" indexed="true" stored="true"/>- <dynamicField name="*_ds" type="${solr.tests.doubleClass:pdouble}" indexed="true" stored="true" multiValued="true"/>- <dynamicField name="*_d_dv" type="${solr.tests.doubleClass:pdouble}" indexed="true" stored="true" docValues="true" multiValued="false"/>- <dynamicField name="*_ds_dv" type="${solr.tests.doubleClass:pdouble}" indexed="true" stored="true" docValues="true" multiValued="true"/>- <dynamicField name="*_d_dvo" type="${solr.tests.doubleClass:pdouble}" indexed="false" stored="true" docValues="true"/>+ <dynamicField name="*_d" type="double" indexed="true" stored="true"/>+ <dynamicField name="*_ds" type="double" indexed="true" stored="true" multiValued="true"/>+ <dynamicField name="*_d_dv" type="double" indexed="true" stored="true" docValues="true" multiValued="false"/>+ <dynamicField name="*_ds_dv" type="double" indexed="true" stored="true" docValues="true" multiValued="true"/>+ <dynamicField name="*_d_dvo" type="double" indexed="false" stored="true" docValues="true"/><dynamicField name="*_s1" type="string" indexed="true" stored="true" multiValued="false"/><!-- :TODO: why are these identical?!?!?! -->@@ -631,7 +631,7 @@<dynamicField name="*_t" type="text" indexed="true" stored="true"/><dynamicField name="*_tt" type="text" indexed="true" stored="true"/><dynamicField name="*_b" type="boolean" indexed="true" stored="true"/>- <dynamicField name="*_dt" type="${solr.tests.dateClass:pdate}" indexed="true" stored="true"/>+ <dynamicField name="*_dt" type="date" indexed="true" stored="true"/><dynamicField name="*_pi" type="pint" indexed="true" stored="true" docValues="false" multiValued="false"/>diff --git a/solr/core/src/test-files/solr/collection1/conf/schema_latest.xml b/solr/core/src/test-files/solr/collection1/conf/schema_latest.xmlindex e55c142b305..127b291f4cb 100644--- a/solr/core/src/test-files/solr/collection1/conf/schema_latest.xml+++ b/solr/core/src/test-files/solr/collection1/conf/schema_latest.xml@@ -109,7 +109,7 @@<!-- If you remove this field, you must _also_ disable the update log in solrconfig.xmlor Solr won't start. _version_ and update log are required for SolrCloud-->- <field name="_version_" type="${solr.tests.longClass:plong}" indexed="false" stored="false" docValues="true"/>+ <field name="_version_" type="long" indexed="false" stored="false" docValues="true"/><!-- points to the root document of a block of nested documents. Required for nesteddocument support, may be removed otherwise@@ -130,9 +130,9 @@<field name="includes" type="text_general" indexed="true" stored="true" termVectors="true" termPositions="true"termOffsets="true"/>- <field name="weight" type="${solr.tests.floatClass:pfloat}" indexed="true" stored="true"/>- <field name="price" type="${solr.tests.floatClass:pfloat}" indexed="true" stored="true"/>- <field name="popularity" type="${solr.tests.intClass:pint}" indexed="true" stored="true"/>+ <field name="weight" type="float" indexed="true" stored="true"/>+ <field name="price" type="float" indexed="true" stored="true"/>+ <field name="popularity" type="int" indexed="true" stored="true"/><field name="inStock" type="boolean" indexed="true" stored="true"/><field name="store" type="location" indexed="true" stored="true"/>@@ -200,45 +200,45 @@a "*" only at the start or the end. --><!-- docvalues and stored are exclusive -->- <dynamicField name="*_i" type="${solr.tests.intClass:pint}" indexed="true" stored="true"/>- <dynamicField name="*_is" type="${solr.tests.intClass:pint}" indexed="true" stored="true" multiValued="true"/>- <dynamicField name="*_id" type="${solr.tests.intClass:pint}" indexed="true" stored="false" docValues="true"/>- <dynamicField name="*_ids" type="${solr.tests.intClass:pint}" indexed="true" stored="false" multiValued="true" docValues="true"/>+ <dynamicField name="*_i" type="int" indexed="true" stored="true"/>+ <dynamicField name="*_is" type="int" indexed="true" stored="true" multiValued="true"/>+ <dynamicField name="*_id" type="int" indexed="true" stored="false" docValues="true"/>+ <dynamicField name="*_ids" type="int" indexed="true" stored="false" multiValued="true" docValues="true"/><dynamicField name="*_s" type="string" indexed="true" stored="true"/><dynamicField name="*_s1" type="string" indexed="true" stored="true"/><dynamicField name="*_ss" type="string" indexed="true" stored="true" multiValued="true"/><dynamicField name="*_sd" type="string" indexed="true" stored="false" docValues="true"/><dynamicField name="*_sds" type="string" indexed="true" stored="false" multiValued="true" docValues="true"/>- <dynamicField name="*_l" type="${solr.tests.longClass:plong}" indexed="true" stored="true"/>- <dynamicField name="*_ls" type="${solr.tests.longClass:plong}" indexed="true" stored="true" multiValued="true"/>- <dynamicField name="*_ld" type="${solr.tests.longClass:plong}" indexed="true" stored="false" docValues="true"/>- <dynamicField name="*_lds" type="${solr.tests.longClass:plong}" indexed="true" stored="false" multiValued="true" docValues="true"/>- <dynamicField name="*_f" type="${solr.tests.floatClass:pfloat}" indexed="true" stored="true"/>- <dynamicField name="*_fs" type="${solr.tests.floatClass:pfloat}" indexed="true" stored="true" multiValued="true"/>- <dynamicField name="*_fd" type="${solr.tests.floatClass:pfloat}" indexed="true" stored="false" docValues="true"/>- <dynamicField name="*_fds" type="${solr.tests.floatClass:pfloat}" indexed="true" stored="false" multiValued="true" docValues="true"/>- <dynamicField name="*_d" type="${solr.tests.doubleClass:pdouble}" indexed="true" stored="true"/>- <dynamicField name="*_ds" type="${solr.tests.doubleClass:pdouble}" indexed="true" stored="true" multiValued="true"/>- <dynamicField name="*_dd" type="${solr.tests.doubleClass:pdouble}" indexed="true" stored="false" docValues="true"/>- <dynamicField name="*_dds" type="${solr.tests.doubleClass:pdouble}" indexed="true" stored="false" multiValued="true" docValues="true"/>- <dynamicField name="*_dt" type="${solr.tests.dateClass:pdate}" indexed="true" stored="true"/>- <dynamicField name="*_dts" type="${solr.tests.dateClass:pdate}" indexed="true" stored="true" multiValued="true"/>- <dynamicField name="*_dtd" type="${solr.tests.dateClass:pdate}" indexed="true" stored="false" docValues="true"/>- <dynamicField name="*_dtds" type="${solr.tests.dateClass:pdate}" indexed="true" stored="false" multiValued="true" docValues="true"/>+ <dynamicField name="*_l" type="long" indexed="true" stored="true"/>+ <dynamicField name="*_ls" type="long" indexed="true" stored="true" multiValued="true"/>+ <dynamicField name="*_ld" type="long" indexed="true" stored="false" docValues="true"/>+ <dynamicField name="*_lds" type="long" indexed="true" stored="false" multiValued="true" docValues="true"/>+ <dynamicField name="*_f" type="float" indexed="true" stored="true"/>+ <dynamicField name="*_fs" type="float" indexed="true" stored="true" multiValued="true"/>+ <dynamicField name="*_fd" type="float" indexed="true" stored="false" docValues="true"/>+ <dynamicField name="*_fds" type="float" indexed="true" stored="false" multiValued="true" docValues="true"/>+ <dynamicField name="*_d" type="double" indexed="true" stored="true"/>+ <dynamicField name="*_ds" type="double" indexed="true" stored="true" multiValued="true"/>+ <dynamicField name="*_dd" type="double" indexed="true" stored="false" docValues="true"/>+ <dynamicField name="*_dds" type="double" indexed="true" stored="false" multiValued="true" docValues="true"/>+ <dynamicField name="*_dt" type="date" indexed="true" stored="true"/>+ <dynamicField name="*_dts" type="date" indexed="true" stored="true" multiValued="true"/>+ <dynamicField name="*_dtd" type="date" indexed="true" stored="false" docValues="true"/>+ <dynamicField name="*_dtds" type="date" indexed="true" stored="false" multiValued="true" docValues="true"/><!-- docvalues and stored (S suffix) -->- <dynamicField name="*_idS" type="${solr.tests.intClass:pint}" indexed="true" stored="true" docValues="true"/>- <dynamicField name="*_idsS" type="${solr.tests.intClass:pint}" indexed="true" stored="true" multiValued="true" docValues="true"/>+ <dynamicField name="*_idS" type="int" indexed="true" stored="true" docValues="true"/>+ <dynamicField name="*_idsS" type="int" indexed="true" stored="true" multiValued="true" docValues="true"/><dynamicField name="*_sdS" type="string" indexed="true" stored="true" docValues="true"/><dynamicField name="*_sdsS" type="string" indexed="true" stored="true" multiValued="true" docValues="true"/>- <dynamicField name="*_ldS" type="${solr.tests.longClass:plong}" indexed="true" stored="true" docValues="true"/>- <dynamicField name="*_ldsS" type="${solr.tests.longClass:plong}" indexed="true" stored="true" multiValued="true" docValues="true"/>- <dynamicField name="*_fdS" type="${solr.tests.floatClass:pfloat}" indexed="true" stored="true" docValues="true"/>- <dynamicField name="*_fdsS" type="${solr.tests.floatClass:pfloat}" indexed="true" stored="true" multiValued="true" docValues="true"/>- <dynamicField name="*_ddS" type="${solr.tests.doubleClass:pdouble}" indexed="true" stored="true" docValues="true"/>- <dynamicField name="*_ddsS" type="${solr.tests.doubleClass:pdouble}" indexed="true" stored="true" multiValued="true" docValues="true"/>- <dynamicField name="*_dtdS" type="${solr.tests.dateClass:pdate}" indexed="true" stored="true" docValues="true"/>- <dynamicField name="*_dtdsS" type="${solr.tests.dateClass:pdate}" indexed="true" stored="true" multiValued="true" docValues="true"/>+ <dynamicField name="*_ldS" type="long" indexed="true" stored="true" docValues="true"/>+ <dynamicField name="*_ldsS" type="long" indexed="true" stored="true" multiValued="true" docValues="true"/>+ <dynamicField name="*_fdS" type="float" indexed="true" stored="true" docValues="true"/>+ <dynamicField name="*_fdsS" type="float" indexed="true" stored="true" multiValued="true" docValues="true"/>+ <dynamicField name="*_ddS" type="double" indexed="true" stored="true" docValues="true"/>+ <dynamicField name="*_ddsS" type="double" indexed="true" stored="true" multiValued="true" docValues="true"/>+ <dynamicField name="*_dtdS" type="date" indexed="true" stored="true" docValues="true"/>+ <dynamicField name="*_dtdsS" type="date" indexed="true" stored="true" multiValued="true" docValues="true"/><dynamicField name="*_b" type="boolean" indexed="true" stored="true"/>@@ -360,10 +360,10 @@These fields support doc values, but they require the field to besingle-valued and either be required or have a default value.-->- <fieldType name="int" class="solr.TrieIntField" precisionStep="0" positionIncrementGap="0"/>- <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" positionIncrementGap="0"/>- <fieldType name="long" class="solr.TrieLongField" precisionStep="0" positionIncrementGap="0"/>- <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" positionIncrementGap="0"/>+ <fieldType name="int" class="${solr.tests.IntegerFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" positionIncrementGap="0"/>+ <fieldType name="float" class="${solr.tests.FloatFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" positionIncrementGap="0"/>+ <fieldType name="long" class="${solr.tests.LongFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" positionIncrementGap="0"/>+ <fieldType name="double" class="${solr.tests.DoubleFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" positionIncrementGap="0"/><!--Numeric field types that index each value at various levels of precision@@ -375,19 +375,11 @@indexed per value, slightly larger index size, and faster range queries.A precisionStep of 0 disables indexing at different precision levels.-->- <fieldType name="tint" class="solr.TrieIntField" precisionStep="8" positionIncrementGap="0"/>- <fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" positionIncrementGap="0"/>- <fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" positionIncrementGap="0"/>- <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" positionIncrementGap="0"/>+ <fieldType name="tint" class="${solr.tests.IntegerFieldType}" precisionStep="8" positionIncrementGap="0"/>+ <fieldType name="tfloat" class="${solr.tests.FloatFieldType}" precisionStep="8" positionIncrementGap="0"/>+ <fieldType name="tlong" class="${solr.tests.LongFieldType}" precisionStep="8" positionIncrementGap="0"/>+ <fieldType name="tdouble" class="${solr.tests.DoubleFieldType}" precisionStep="8" positionIncrementGap="0"/>- <!-- Point Fields -->- <fieldType name="pint" class="solr.IntPointField" docValues="true"/>- <fieldType name="plong" class="solr.LongPointField" docValues="true"/>- <fieldType name="pdouble" class="solr.DoublePointField" docValues="true"/>- <fieldType name="pfloat" class="solr.FloatPointField" docValues="true"/>- <fieldType name="pdate" class="solr.DatePointField" docValues="true"/>--<!-- The format for this date field is of the form 1995-12-31T23:59:59Z, andis a more restricted form of the canonical representation of dateTimehttp://www.w3.org/TR/xmlschema-2/#dateTime@@ -410,10 +402,10 @@Note: For faster range queries, consider the tdate type-->- <fieldType name="date" class="solr.TrieDateField" precisionStep="0" positionIncrementGap="0"/>+ <fieldType name="date" class="${solr.tests.DateFieldType}" precisionStep="0" positionIncrementGap="0"/><!-- A Trie based date field for faster date range queries and date faceting. -->- <fieldType name="tdate" class="solr.TrieDateField" precisionStep="6" positionIncrementGap="0"/>+ <fieldType name="tdate" class="${solr.tests.DateFieldType}" precisionStep="6" positionIncrementGap="0"/><!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings -->diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig.xmlindex 5de3e64a39b..7466d01b5f8 100644--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml@@ -222,7 +222,7 @@text^0.2 features_t^1.1 subject^1.4 title_stemmed^2.0 title^1.5</str><str name="bf">- ord(weight)^0.5 recip(rord(iind),1,1000,1000)^0.3+ weight^0.5 recip(rord(id),1,1000,1000)^0.3</str><str name="mm">3<-1 5<-2 6<90%diff --git a/solr/core/src/test/org/apache/solr/CursorPagingTest.java b/solr/core/src/test/org/apache/solr/CursorPagingTest.javaindex dfaddea6cac..c1b993560b7 100644--- a/solr/core/src/test/org/apache/solr/CursorPagingTest.java+++ b/solr/core/src/test/org/apache/solr/CursorPagingTest.java@@ -64,6 +64,8 @@ public class CursorPagingTest extends SolrTestCaseJ4 {@BeforeClasspublic static void beforeTests() throws Exception {+ // we need DVs on point fields to compute stats & facets+ if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) System.setProperty(NUMERIC_DOCVALUES_SYSPROP,"true");System.setProperty("solr.test.useFilterForSortedQuery", Boolean.toString(random().nextBoolean()));initCore(TEST_SOLRCONFIG_NAME, TEST_SCHEMAXML_NAME);}diff --git a/solr/core/src/test/org/apache/solr/DisMaxRequestHandlerTest.java b/solr/core/src/test/org/apache/solr/DisMaxRequestHandlerTest.javaindex faf67b42185..bdeeb40ea17 100644--- a/solr/core/src/test/org/apache/solr/DisMaxRequestHandlerTest.java+++ b/solr/core/src/test/org/apache/solr/DisMaxRequestHandlerTest.java@@ -86,8 +86,8 @@ public class DisMaxRequestHandlerTest extends SolrTestCaseJ4 {req("cool stuff"),"//*[@numFound='3']","//result/doc[1]/str[@name='id'][.='42']"- ,"//result/doc[2]/str[@name='id'][.='666']"- ,"//result/doc[3]/str[@name='id'][.='8675309']"+ ,"//result/doc[2]/str[@name='id'][.='8675309']"+ ,"//result/doc[3]/str[@name='id'][.='666']");assertQ("multi qf",diff --git a/solr/core/src/test/org/apache/solr/TestDistributedGrouping.java b/solr/core/src/test/org/apache/solr/TestDistributedGrouping.javaindex d187da81000..534a29963bd 100644--- a/solr/core/src/test/org/apache/solr/TestDistributedGrouping.java+++ b/solr/core/src/test/org/apache/solr/TestDistributedGrouping.java@@ -27,6 +27,7 @@ import org.apache.solr.common.SolrDocumentList;import org.apache.solr.common.params.CommonParams;import org.apache.solr.common.params.ModifiableSolrParams;import org.apache.solr.common.util.NamedList;+import org.apache.solr.SolrTestCaseJ4.SuppressPointFields;import org.junit.Test;/**@@ -37,8 +38,14 @@ import org.junit.Test;* @since solr 4.0*/@Slow+@SuppressPointFields(bugUrl="https://issues.apache.org/jira/browse/SOLR-10844")public class TestDistributedGrouping extends BaseDistributedSearchTestCase {+ public TestDistributedGrouping() {+ // SOLR-10844: Even with points suppressed, this test breaks if we (randomize) docvalues="true" on trie fields?!?!?!!?+ System.setProperty(NUMERIC_DOCVALUES_SYSPROP,"false");+ }+String t1="a_t";String i1dv="a_idv";String i1="a_i1";diff --git a/solr/core/src/test/org/apache/solr/TestDistributedSearch.java b/solr/core/src/test/org/apache/solr/TestDistributedSearch.javaindex cde3296443a..9a821aaeefb 100644--- a/solr/core/src/test/org/apache/solr/TestDistributedSearch.java+++ b/solr/core/src/test/org/apache/solr/TestDistributedSearch.java@@ -101,6 +101,11 @@ public class TestDistributedSearch extends BaseDistributedSearchTestCase {// server so that we don't use a bad oneSystem.setProperty("validateAfterInactivity", "200");}++ public TestDistributedSearch() {+ // we need DVs on point fields to compute stats & facets+ if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) System.setProperty(NUMERIC_DOCVALUES_SYSPROP,"true");+ }@Testpublic void test() throws Exception {diff --git a/solr/core/src/test/org/apache/solr/TestGroupingSearch.java b/solr/core/src/test/org/apache/solr/TestGroupingSearch.javaindex 99dc63c8717..77b1cf77472 100644--- a/solr/core/src/test/org/apache/solr/TestGroupingSearch.java+++ b/solr/core/src/test/org/apache/solr/TestGroupingSearch.java@@ -60,6 +60,9 @@ public class TestGroupingSearch extends SolrTestCaseJ4 {@BeforeClasspublic static void beforeTests() throws Exception {+ // we need DVs on point fields to compute stats & facets+ if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) System.setProperty(NUMERIC_DOCVALUES_SYSPROP,"true");+// force LogDocMergePolicy so that we get a predictable doc order// when doing unsorted group collectionsystemSetPropertySolrTestsMergePolicyFactory(LogDocMergePolicyFactory.class.getName());diff --git a/solr/core/src/test/org/apache/solr/TestRandomDVFaceting.java b/solr/core/src/test/org/apache/solr/TestRandomDVFaceting.javaindex 0a9cb2b89a0..46762ea006a 100644--- a/solr/core/src/test/org/apache/solr/TestRandomDVFaceting.java+++ b/solr/core/src/test/org/apache/solr/TestRandomDVFaceting.java@@ -45,6 +45,11 @@ public class TestRandomDVFaceting extends SolrTestCaseJ4 {@BeforeClasspublic static void beforeTests() throws Exception {+ // we need DVs on point fields to compute stats & facets+ // but test also has hard coded assumptions about these field types *NOT* having DV when *NOT* points+ // so use docvalue if and only if we are using points...+ System.setProperty(NUMERIC_DOCVALUES_SYSPROP, System.getProperty(NUMERIC_POINTS_SYSPROP));+initCore("solrconfig-basic.xml","schema-docValuesFaceting.xml");}diff --git a/solr/core/src/test/org/apache/solr/TestRandomFaceting.java b/solr/core/src/test/org/apache/solr/TestRandomFaceting.javaindex c3a3e02996d..ff53315f51c 100644--- a/solr/core/src/test/org/apache/solr/TestRandomFaceting.java+++ b/solr/core/src/test/org/apache/solr/TestRandomFaceting.java@@ -57,6 +57,9 @@ public class TestRandomFaceting extends SolrTestCaseJ4 {@BeforeClasspublic static void beforeTests() throws Exception {+ // we need DVs on point fields to compute stats & facets+ if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) System.setProperty(NUMERIC_DOCVALUES_SYSPROP,"true");+System.setProperty("enable.update.log", "false"); // schema12 doesn't support _version_initCore("solrconfig.xml","schema12.xml");}diff --git a/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java b/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.javaindex b95d5581c99..838ebb5542e 100644--- a/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java+++ b/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java@@ -58,6 +58,9 @@ public class BasicDistributedZk2Test extends AbstractFullDistribZkTestBase {public BasicDistributedZk2Test() {super();+ // we need DVs on point fields to compute stats & facets+ if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) System.setProperty(NUMERIC_DOCVALUES_SYSPROP,"true");+sliceCount = 2;}diff --git a/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java b/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.javaindex ac96b620bed..d74f58e7763 100644--- a/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java+++ b/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java@@ -114,6 +114,9 @@ public class BasicDistributedZkTest extends AbstractFullDistribZkTestBase {Set<Future<Object>> pending;public BasicDistributedZkTest() {+ // we need DVs on point fields to compute stats & facets+ if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) System.setProperty(NUMERIC_DOCVALUES_SYSPROP,"true");+sliceCount = 2;completionService = new ExecutorCompletionService<>(executor);pending = new HashSet<>();diff --git a/solr/core/src/test/org/apache/solr/cloud/TestAuthenticationFramework.java b/solr/core/src/test/org/apache/solr/cloud/TestAuthenticationFramework.javaindex df3790dd722..8159e4983aa 100644--- a/solr/core/src/test/org/apache/solr/cloud/TestAuthenticationFramework.java+++ b/solr/core/src/test/org/apache/solr/cloud/TestAuthenticationFramework.java@@ -86,6 +86,7 @@ public class TestAuthenticationFramework extends LuceneTestCase {@Beforepublic void setUp() throws Exception {+ SolrTestCaseJ4.randomizeNumericTypesProperties(); // SOLR-10916setupAuthenticationPlugin();super.setUp();}@@ -126,6 +127,7 @@ public class TestAuthenticationFramework extends LuceneTestCase {@Afterpublic void tearDown() throws Exception {+ SolrTestCaseJ4.clearNumericTypesProperties(); // SOLR-10916System.clearProperty("authenticationPlugin");super.tearDown();}diff --git a/solr/core/src/test/org/apache/solr/cloud/TestMiniSolrCloudCluster.java b/solr/core/src/test/org/apache/solr/cloud/TestMiniSolrCloudCluster.javaindex a8250f8538e..dd4d13c07c6 100644--- a/solr/core/src/test/org/apache/solr/cloud/TestMiniSolrCloudCluster.java+++ b/solr/core/src/test/org/apache/solr/cloud/TestMiniSolrCloudCluster.java@@ -46,6 +46,8 @@ import org.apache.solr.common.cloud.ZkStateReader;import org.apache.solr.core.CoreDescriptor;import org.apache.solr.index.TieredMergePolicyFactory;import org.apache.solr.util.RevertDefaultThreadHandlerRule;+import org.junit.AfterClass;+import org.junit.BeforeClass;import org.junit.ClassRule;import org.junit.Rule;import org.junit.Test;@@ -73,6 +75,15 @@ public class TestMiniSolrCloudCluster extends LuceneTestCase {REPLICATION_FACTOR = 2;}+ @BeforeClass+ public static void setupHackNumerics() { // SOLR-10916+ SolrTestCaseJ4.randomizeNumericTypesProperties();+ }+ @AfterClass+ public static void clearHackNumerics() { // SOLR-10916+ SolrTestCaseJ4.clearNumericTypesProperties();+ }+@Rulepublic TestRule solrTestRules = RuleChain.outerRule(new SystemPropertiesRestoreRule());diff --git a/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithKerberosAlt.java b/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithKerberosAlt.javaindex 1758ae08762..16cee78230a 100644--- a/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithKerberosAlt.java+++ b/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithKerberosAlt.java@@ -94,6 +94,7 @@ public class TestSolrCloudWithKerberosAlt extends LuceneTestCase {@Overridepublic void setUp() throws Exception {+ SolrTestCaseJ4.randomizeNumericTypesProperties(); // SOLR-10916super.setUp();setupMiniKdc();}@@ -225,6 +226,7 @@ public class TestSolrCloudWithKerberosAlt extends LuceneTestCase {System.clearProperty("solr.kerberos.name.rules");System.clearProperty("solr.jaas.debug");kerberosTestServices.stop();+ SolrTestCaseJ4.clearNumericTypesProperties(); // SOLR-10916super.tearDown();}}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 0c5e128ba8a..eb6f54d5db4 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@@ -37,6 +37,11 @@ public class DistributedFacetPivotLargeTest extends BaseDistributedSearchTestCaspublic static final String SPECIAL = "";+ public DistributedFacetPivotLargeTest() {+ // we need DVs on point fields to compute stats & facets+ if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) System.setProperty(NUMERIC_DOCVALUES_SYSPROP,"true");+ }+@Test@ShardsFixed(num = 4)public void test() throws Exception {diff --git a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotLongTailTest.java b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotLongTailTest.javaindex 52f1825ae4e..f18f551d726 100644--- a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotLongTailTest.java+++ b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotLongTailTest.java@@ -40,6 +40,11 @@ import org.junit.Test;public class DistributedFacetPivotLongTailTest extends BaseDistributedSearchTestCase {private int docNumber = 0;++ public DistributedFacetPivotLongTailTest() {+ // we need DVs on point fields to compute stats & facets+ if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) System.setProperty(NUMERIC_DOCVALUES_SYSPROP,"true");+ }public int getDocNum() {docNumber++;diff --git a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotSmallAdvancedTest.java b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotSmallAdvancedTest.javaindex 1ed60e4a919..d579b7aadac 100644--- a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotSmallAdvancedTest.java+++ b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotSmallAdvancedTest.java@@ -37,6 +37,11 @@ import java.util.List;*/public class DistributedFacetPivotSmallAdvancedTest extends BaseDistributedSearchTestCase {+ public DistributedFacetPivotSmallAdvancedTest() {+ // we need DVs on point fields to compute stats & facets+ if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) System.setProperty(NUMERIC_DOCVALUES_SYSPROP,"true");+ }+@Test@ShardsFixed(num = 2)public void test() throws Exception {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 d293e69af25..71e34e3bbc2 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@@ -37,6 +37,11 @@ import org.junit.Test;public class DistributedFacetPivotSmallTest extends BaseDistributedSearchTestCase {+ public DistributedFacetPivotSmallTest() {+ // we need DVs on point fields to compute stats & facets+ if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) System.setProperty(NUMERIC_DOCVALUES_SYSPROP,"true");+ }+@Test@ShardsFixed(num = 4)public void test() throws Exception {diff --git a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotWhiteBoxTest.java b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotWhiteBoxTest.javaindex a824c9d0407..89cd6875703 100644--- a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotWhiteBoxTest.java+++ b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotWhiteBoxTest.java@@ -27,6 +27,11 @@ import java.util.List;public class DistributedFacetPivotWhiteBoxTest extends BaseDistributedSearchTestCase {+ public DistributedFacetPivotWhiteBoxTest() {+ // we need DVs on point fields to compute stats & facets+ if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) System.setProperty(NUMERIC_DOCVALUES_SYSPROP,"true");+ }+@Test@ShardsFixed(num = 4)public void test() throws Exception {diff --git a/solr/core/src/test/org/apache/solr/handler/component/DistributedTermsComponentTest.java b/solr/core/src/test/org/apache/solr/handler/component/DistributedTermsComponentTest.javaindex b3f1f306b6e..6f719d2bd29 100644--- a/solr/core/src/test/org/apache/solr/handler/component/DistributedTermsComponentTest.java+++ b/solr/core/src/test/org/apache/solr/handler/component/DistributedTermsComponentTest.java@@ -16,6 +16,7 @@*/package org.apache.solr.handler.component;+import org.apache.solr.SolrTestCaseJ4.SuppressPointFields;import org.apache.solr.BaseDistributedSearchTestCase;import org.junit.Test;@@ -25,10 +26,12 @@ import org.junit.Test;** @since solr 1.5*/+@SuppressPointFields(bugUrl="https://issues.apache.org/jira/browse/SOLR-10847")public class DistributedTermsComponentTest extends BaseDistributedSearchTestCase {@Testpublic void test() throws Exception {+del("*:*");index(id, 18, "b_t", "snake spider shark snail slug seal", "foo_i", "1");index(id, 19, "b_t", "snake spider shark snail slug", "foo_i", "2");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 ce708a67d00..4b5e8a75fb8 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@@ -30,6 +30,8 @@ public class FacetPivotSmallTest extends SolrTestCaseJ4 {@BeforeClasspublic static void beforeClass() throws Exception {+ // we need DVs on point fields to compute stats & facets+ if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) System.setProperty(NUMERIC_DOCVALUES_SYSPROP,"true");initCore("solrconfig.xml", "schema11.xml");}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 568676c7f38..3bb497479ac 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@@ -68,6 +68,8 @@ public class StatsComponentTest extends AbstractSolrTestCase {@BeforeClasspublic static void beforeClass() throws Exception {+ // we need DVs on point fields to compute stats & facets+ if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) System.setProperty(NUMERIC_DOCVALUES_SYSPROP,"true");initCore("solrconfig.xml", "schema11.xml");}diff --git a/solr/core/src/test/org/apache/solr/handler/component/TestDistributedStatsComponentCardinality.java b/solr/core/src/test/org/apache/solr/handler/component/TestDistributedStatsComponentCardinality.javaindex dca45dc63a0..8a5f4b175d9 100644--- a/solr/core/src/test/org/apache/solr/handler/component/TestDistributedStatsComponentCardinality.java+++ b/solr/core/src/test/org/apache/solr/handler/component/TestDistributedStatsComponentCardinality.java@@ -61,7 +61,9 @@ public class TestDistributedStatsComponentCardinality extends BaseDistributedSeafinal long MIN_LONG;public TestDistributedStatsComponentCardinality() {- super();+ // we need DVs on point fields to compute stats+ if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) System.setProperty(NUMERIC_DOCVALUES_SYSPROP,"true");+// we want some randomness in the shard number, but we don't want multiple iterationsfixShardCount(TEST_NIGHTLY ? 7 : random().nextInt(3) + 1);@@ -142,13 +144,17 @@ public class TestDistributedStatsComponentCardinality extends BaseDistributedSeaMap<String,FieldStatsInfo> stats = rsp.getFieldStatsInfo();- for (String f : STAT_FIELDS) {- // regardless of log2m and regwidth, the estimated cardinality of the- // hashed vs prehashed values should be exactly the same for each field-- assertEquals(f + ": hashed vs prehashed, real="+ numMatches + ", p=" + p,- stats.get(f).getCardinality().longValue(),- stats.get(f+"_prehashed_l").getCardinality().longValue());+ if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) {+ log.warn("SOLR-10918: can't relying on exact match with pre-hashed values when using points");+ } else {+ for (String f : STAT_FIELDS) {+ // regardless of log2m and regwidth, the estimated cardinality of the+ // hashed vs prehashed values should be exactly the same for each field++ assertEquals(f + ": hashed vs prehashed, real="+ numMatches + ", p=" + p,+ stats.get(f).getCardinality().longValue(),+ stats.get(f+"_prehashed_l").getCardinality().longValue());+ }}for (String f : STAT_FIELDS) {diff --git a/solr/core/src/test/org/apache/solr/request/SimpleFacetsTest.java b/solr/core/src/test/org/apache/solr/request/SimpleFacetsTest.javaindex 8f4a24d8b79..0ee345ee1ed 100644--- a/solr/core/src/test/org/apache/solr/request/SimpleFacetsTest.java+++ b/solr/core/src/test/org/apache/solr/request/SimpleFacetsTest.java@@ -50,6 +50,8 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {@BeforeClasspublic static void beforeClass() throws Exception {+ // we need DVs on point fields to compute stats & facets+ if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) System.setProperty(NUMERIC_DOCVALUES_SYSPROP,"true");initCore("solrconfig.xml","schema.xml");createIndex();}@@ -368,6 +370,10 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {@Testpublic void testSimpleGroupedFacets() throws Exception {+ assumeFalse("SOLR-10844: group.facet doesn't play nice with points *OR* DocValues",+ Boolean.getBoolean(NUMERIC_DOCVALUES_SYSPROP) || Boolean.getBoolean(NUMERIC_POINTS_SYSPROP));++// for the purposes of our test data, it shouldn't matter// if we use facet.limit -100, -1, or 100 ...// our set of values is small enough either way@@ -497,7 +503,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {Map rsp = (Map) ObjectBuilder.fromJSON(response);Long numFound = (Long)(((Map)rsp.get("response")).get("numFound"));- ModifiableSolrParams params = params("q","*:*", "rows","0", "facet","true", "facet.field","{!key=myalias}"+field);+ ModifiableSolrParams params = params("q","*:*", "facet.mincount","1","rows","0", "facet","true", "facet.field","{!key=myalias}"+field);String[] methods = {null, "fc","enum","fcs", "uif"};if (sf.multiValued() || sf.getType().multiValuedFieldCache()) {diff --git a/solr/core/src/test/org/apache/solr/request/TestFaceting.java b/solr/core/src/test/org/apache/solr/request/TestFaceting.javaindex 8933c196cd7..9559b4ca405 100644--- a/solr/core/src/test/org/apache/solr/request/TestFaceting.java+++ b/solr/core/src/test/org/apache/solr/request/TestFaceting.java@@ -41,6 +41,8 @@ import org.junit.Test;public class TestFaceting extends SolrTestCaseJ4 {@BeforeClasspublic static void beforeClass() throws Exception {+ // we need DVs on point fields to compute stats & facets+ if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) System.setProperty(NUMERIC_DOCVALUES_SYSPROP,"true");initCore("solrconfig.xml","schema11.xml");}@@ -269,6 +271,9 @@ public class TestFaceting extends SolrTestCaseJ4 {@Testpublic void testTrieFields() {+ assumeFalse("Test is only relevant when randomizing Trie fields",+ Boolean.getBoolean(NUMERIC_POINTS_SYSPROP));+// make sure that terms are correctly filtered even for trie fields that index several// terms for a single valueList<String> fields = new ArrayList<>();@@ -286,9 +291,10 @@ public class TestFaceting extends SolrTestCaseJ4 {for (String facetSort : new String[] {FacetParams.FACET_SORT_COUNT, FacetParams.FACET_SORT_INDEX}) {for (String value : new String[] {"42", "43"}) { // match or notfinal String field = "f_" + suffix;+ final int num_constraints = ("42".equals(value)) ? 1 : 0;assertQ("field=" + field + ",method=" + facetMethod + ",sort=" + facetSort,- req("q", field + ":" + value, FacetParams.FACET, "true", FacetParams.FACET_FIELD, field, FacetParams.FACET_MINCOUNT, "0", FacetParams.FACET_SORT, facetSort, FacetParams.FACET_METHOD, facetMethod),- "*[count(//lst[@name='" + field + "']/int)=1]"); // exactly 1 facet count+ req("q", field + ":" + value, FacetParams.FACET, "true", FacetParams.FACET_FIELD, field, FacetParams.FACET_MINCOUNT, "1", FacetParams.FACET_SORT, facetSort, FacetParams.FACET_METHOD, facetMethod),+ "*[count(//lst[@name='" + field + "']/int)="+num_constraints+"]");}}}@@ -329,6 +335,9 @@ public class TestFaceting extends SolrTestCaseJ4 {@Testpublic void testFacetSortWithMinCount0() {+ assumeFalse("facet.mincount=0 doesn't work with point fields (SOLR-10033) or single valued DV",+ Boolean.getBoolean(NUMERIC_POINTS_SYSPROP) || Boolean.getBoolean(NUMERIC_DOCVALUES_SYSPROP));+assertU(adoc("id", "1", "f_td", "-420.126"));assertU(adoc("id", "2", "f_td", "-285.672"));assertU(adoc("id", "3", "f_td", "-1.218"));diff --git a/solr/core/src/test/org/apache/solr/request/TestIntervalFaceting.java b/solr/core/src/test/org/apache/solr/request/TestIntervalFaceting.javaindex f0c5f437d5a..fc8ddff37bb 100644--- a/solr/core/src/test/org/apache/solr/request/TestIntervalFaceting.java+++ b/solr/core/src/test/org/apache/solr/request/TestIntervalFaceting.java@@ -46,6 +46,8 @@ public class TestIntervalFaceting extends SolrTestCaseJ4 {@BeforeClasspublic static void beforeTests() throws Exception {+ // we need DVs on point fields to compute stats & facets+ if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) System.setProperty(NUMERIC_DOCVALUES_SYSPROP,"true");initCore("solrconfig-basic.xml", "schema-docValuesFaceting.xml");}diff --git a/solr/core/src/test/org/apache/solr/request/TestWriterPerf.java b/solr/core/src/test/org/apache/solr/request/TestWriterPerf.javaindex 9a5329d2ba3..1e4663f50e8 100644--- a/solr/core/src/test/org/apache/solr/request/TestWriterPerf.java+++ b/solr/core/src/test/org/apache/solr/request/TestWriterPerf.java@@ -43,6 +43,8 @@ public class TestWriterPerf extends AbstractSolrTestCase {@BeforeClasspublic static void beforeClass() throws Exception {+ // we need DVs on point fields to compute stats & facets+ if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) System.setProperty(NUMERIC_DOCVALUES_SYSPROP,"true");initCore("solrconfig-functionquery.xml", "schema11.xml");}diff --git a/solr/core/src/test/org/apache/solr/response/TestExportWriter.java b/solr/core/src/test/org/apache/solr/response/TestExportWriter.javaindex c55678702b1..82f73f9a9ef 100644--- a/solr/core/src/test/org/apache/solr/response/TestExportWriter.java+++ b/solr/core/src/test/org/apache/solr/response/TestExportWriter.java@@ -24,14 +24,11 @@ import java.util.List;import java.util.Locale;import java.util.Set;-import org.apache.lucene.index.LeafReader;import org.apache.solr.SolrTestCaseJ4;import org.apache.solr.common.SolrInputDocument;import org.apache.solr.common.util.SuppressForbidden;import org.apache.solr.common.util.Utils;import org.apache.solr.schema.SchemaField;-import org.apache.solr.search.SolrIndexSearcher;-import org.apache.solr.util.RefCounted;import org.junit.Before;import org.junit.BeforeClass;import org.junit.Test;@@ -242,21 +239,13 @@ public class TestExportWriter extends SolrTestCaseJ4 {@Testpublic void testDuplicates() throws Exception {- RefCounted<SolrIndexSearcher> ref = null;- try {- ref = h.getCore().getSearcher();- LeafReader reader = ref.get().getSlowAtomicReader();- // MultiValued Trie fields use SortedSet- assertNotNull(reader.getSortedSetDocValues("int_is_t"));- assertNull(reader.getSortedNumericDocValues("int_is_t"));- // MultiValued Point fields use SortedNumerics- assertNull(reader.getSortedSetDocValues("int_is_p"));- assertNotNull(reader.getSortedNumericDocValues("int_is_p"));- } finally {- if (ref != null) ref.decref();- }+ // see SOLR-10924+ String expected = h.getCore().getLatestSchema().getField("int_is_t").getType().isPointField()+ ? "1,1,1,1" : "1";String s = h.query(req("q", "id:3", "qt", "/export", "fl", "int_is_t", "sort", "intdv asc"));- assertJsonEquals(s, "{\"responseHeader\": {\"status\": 0}, \"response\":{\"numFound\":1, \"docs\":[{\"int_is_t\":[1]}]}}");+ assertJsonEquals(s, "{\"responseHeader\": {\"status\": 0}, \"response\":{\"numFound\":1, \"docs\":[{\"int_is_t\":["+expected+"]}]}}");+ expected = h.getCore().getLatestSchema().getField("int_is_p").getType().isPointField()+ ? "1,1,1,1" : "1";s = h.query(req("q", "id:8", "qt", "/export", "fl", "int_is_p", "sort", "intdv asc"));assertJsonEquals(s, "{\"responseHeader\": {\"status\": 0}, \"response\":{\"numFound\":1, \"docs\":[{\"int_is_p\":[1,1,1,1]}]}}");}@@ -279,7 +268,6 @@ public class TestExportWriter extends SolrTestCaseJ4 {SchemaField sf = h.getCore().getLatestSchema().getField(field + "_t");assertTrue(sf.hasDocValues());assertTrue(sf.getType().getNumberType() != null);- assertFalse(sf.getType().isPointField());sf = h.getCore().getLatestSchema().getField(field + "_p");assertTrue(sf.hasDocValues());diff --git a/solr/core/src/test/org/apache/solr/schema/IndexSchemaTest.java b/solr/core/src/test/org/apache/solr/schema/IndexSchemaTest.javaindex 7790859fcde..4719f0408fb 100644--- a/solr/core/src/test/org/apache/solr/schema/IndexSchemaTest.java+++ b/solr/core/src/test/org/apache/solr/schema/IndexSchemaTest.java@@ -16,6 +16,7 @@*/package org.apache.solr.schema;+import org.apache.solr.SolrTestCaseJ4;import org.apache.solr.common.params.CommonParams;import org.apache.solr.common.params.MapSolrParams;@@ -25,6 +26,7 @@ import org.apache.solr.request.SolrQueryRequest;import org.junit.BeforeClass;import org.junit.Test;+import java.util.Date;import java.util.HashMap;import java.util.Map;@@ -95,20 +97,22 @@ public class IndexSchemaTest extends SolrTestCaseJ4 {SolrCore core = h.getCore();IndexSchema schema = core.getLatestSchema();assertFalse(schema.getField("id").multiValued());-++ final String dateClass = RANDOMIZED_NUMERIC_FIELDTYPES.get(Date.class);+ final boolean usingPoints = Boolean.getBoolean(NUMERIC_POINTS_SYSPROP);// Test TrieDate fields. The following asserts are expecting a field type defined as:- String expectedDefinition = "<fieldtype name=\"tdatedv\" class=\"solr.TrieDateField\" " ++ String expectedDefinition = "<fieldtype name=\"tdatedv\" class=\""+dateClass+"\" " +"precisionStep=\"6\" docValues=\"true\" multiValued=\"true\"/>";FieldType tdatedv = schema.getFieldType("foo_tdtdvs");assertTrue("Expecting a field type defined as " + expectedDefinition,- tdatedv instanceof TrieDateField);+ (usingPoints ? DatePointField.class : TrieDateField.class).isInstance(tdatedv));assertTrue("Expecting a field type defined as " + expectedDefinition,- tdatedv.hasProperty(FieldProperties.DOC_VALUES));+ tdatedv.hasProperty(FieldProperties.DOC_VALUES));assertTrue("Expecting a field type defined as " + expectedDefinition,- tdatedv.isMultiValued());- assertEquals("Expecting a field type defined as " + expectedDefinition,- 6, ((TrieDateField)tdatedv).getPrecisionStep());+ tdatedv.isMultiValued());+ if ( ! usingPoints ) {+ assertEquals("Expecting a field type defined as " + expectedDefinition,+ 6, ((TrieDateField)tdatedv).getPrecisionStep());+ }}--}diff --git a/solr/core/src/test/org/apache/solr/schema/PolyFieldTest.java b/solr/core/src/test/org/apache/solr/schema/PolyFieldTest.javaindex 900e4396e21..317b542837f 100644--- a/solr/core/src/test/org/apache/solr/schema/PolyFieldTest.java+++ b/solr/core/src/test/org/apache/solr/schema/PolyFieldTest.java@@ -48,10 +48,6 @@ public class PolyFieldTest extends SolrTestCaseJ4 {assertTrue(home.isPolyField());String subFieldType = "double";- if (usingPointFields()) {- subFieldType = "pdouble";- }-SchemaField[] dynFields = schema.getDynamicFieldPrototypes();boolean seen = false;for (SchemaField dynField : dynFields) {@@ -187,9 +183,5 @@ public class PolyFieldTest extends SolrTestCaseJ4 {assertEquals(2, bq.clauses().size());clearIndex();}-- private boolean usingPointFields() {- return h.getCore().getLatestSchema().getField("foo_d1_dv").getType().isPointField();- }}diff --git a/solr/core/src/test/org/apache/solr/search/TestCollapseQParserPlugin.java b/solr/core/src/test/org/apache/solr/search/TestCollapseQParserPlugin.javaindex 087c7e11e26..b99198d7e8c 100644--- a/solr/core/src/test/org/apache/solr/search/TestCollapseQParserPlugin.java+++ b/solr/core/src/test/org/apache/solr/search/TestCollapseQParserPlugin.java@@ -37,6 +37,8 @@ import org.junit.Test;public class TestCollapseQParserPlugin extends SolrTestCaseJ4 {@BeforeClasspublic static void beforeClass() throws Exception {+ // we need DVs on point fields to compute stats & facets+ if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) System.setProperty(NUMERIC_DOCVALUES_SYSPROP,"true");initCore("solrconfig-collapseqparser.xml", "schema11.xml");}diff --git a/solr/core/src/test/org/apache/solr/search/TestGraphTermsQParserPlugin.java b/solr/core/src/test/org/apache/solr/search/TestGraphTermsQParserPlugin.javaindex 1cb927d3644..f62a8bf98bb 100644--- a/solr/core/src/test/org/apache/solr/search/TestGraphTermsQParserPlugin.java+++ b/solr/core/src/test/org/apache/solr/search/TestGraphTermsQParserPlugin.java@@ -19,6 +19,7 @@ package org.apache.solr.search;import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;import org.apache.solr.SolrTestCaseJ4;+import org.apache.solr.SolrTestCaseJ4.SuppressPointFields;import org.apache.solr.common.params.ModifiableSolrParams;import org.junit.Before;import org.junit.BeforeClass;@@ -26,6 +27,7 @@ import org.junit.Test;//We want codecs that support DocValues, and ones supporting blank/empty values.@SuppressCodecs({"Appending","Lucene3x","Lucene40","Lucene41","Lucene42"})+@SuppressPointFields(bugUrl="https://issues.apache.org/jira/browse/SOLR-10845")public class TestGraphTermsQParserPlugin extends SolrTestCaseJ4 {@BeforeClassdiff --git a/solr/core/src/test/org/apache/solr/search/TestMaxScoreQueryParser.java b/solr/core/src/test/org/apache/solr/search/TestMaxScoreQueryParser.javaindex 53caf770acc..6c2694dedb4 100644--- a/solr/core/src/test/org/apache/solr/search/TestMaxScoreQueryParser.java+++ b/solr/core/src/test/org/apache/solr/search/TestMaxScoreQueryParser.java@@ -48,8 +48,14 @@ public class TestMaxScoreQueryParser extends AbstractSolrTestCase {assertEquals(new BoostQuery(new TermQuery(new Term("text", "foo")), 3f), q);q = parse("price:[0 TO 10]");- assertTrue(q instanceof LegacyNumericRangeQuery- || (q instanceof IndexOrDocValuesQuery && ((IndexOrDocValuesQuery)q).getIndexQuery() instanceof PointRangeQuery));+ Class expected = LegacyNumericRangeQuery.class;+ if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) {+ expected = PointRangeQuery.class;+ if (Boolean.getBoolean(NUMERIC_DOCVALUES_SYSPROP)) {+ expected = IndexOrDocValuesQuery.class;+ }+ }+ assertTrue(expected + " vs actual: " + q.getClass(), expected.isInstance(q));}@Testdiff --git a/solr/core/src/test/org/apache/solr/search/TestSolrQueryParser.java b/solr/core/src/test/org/apache/solr/search/TestSolrQueryParser.javaindex 6db4800e206..3877c8c1aab 100644--- a/solr/core/src/test/org/apache/solr/search/TestSolrQueryParser.java+++ b/solr/core/src/test/org/apache/solr/search/TestSolrQueryParser.java@@ -41,6 +41,7 @@ import org.apache.solr.common.params.SolrParams;import org.apache.solr.parser.QueryParser;import org.apache.solr.query.FilterQuery;import org.apache.solr.request.SolrQueryRequest;+import org.apache.solr.schema.SchemaField;import org.junit.BeforeClass;import org.junit.Test;import org.noggit.ObjectBuilder;@@ -149,14 +150,17 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {);// length of date math caused issues...- if (h.getCore().getLatestSchema().getField("foo_dt").getType().isPointField()) {- assertJQ(req("q", "foo_dt:\"2013-03-08T00:46:15Z/DAY+000MILLISECONDS+00SECONDS+00MINUTES+00HOURS+0000000000YEARS+6MONTHS+3DAYS\"", "debug", "query")- , "/debug/parsedquery=='IndexOrDocValuesQuery(foo_dt:[1378857600000 TO 1378857600000])'"- );- } else {+ {+ SchemaField foo_dt = h.getCore().getLatestSchema().getField("foo_dt");+ String expected = "foo_dt:2013-09-11T00:00:00Z";+ if (foo_dt.getType().isPointField()) {+ expected = "(foo_dt:[1378857600000 TO 1378857600000])";+ if (foo_dt.hasDocValues() && foo_dt.indexed()) {+ expected = "IndexOrDocValuesQuery"+expected ;+ }+ }assertJQ(req("q", "foo_dt:\"2013-03-08T00:46:15Z/DAY+000MILLISECONDS+00SECONDS+00MINUTES+00HOURS+0000000000YEARS+6MONTHS+3DAYS\"", "debug", "query")- , "/debug/parsedquery=='foo_dt:2013-09-11T00:00:00Z'"- );+ , "/debug/parsedquery=='"+expected+"'");}}@@ -279,7 +283,11 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {qParser.setIsFilter(true); // this may change in the futureqParser.setParams(params);q = qParser.getQuery();- assertEquals(20, ((TermInSetQuery)q).getTermData().size());+ if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) {+ assertEquals(20, ((PointInSetQuery)q).getPackedPoints().size());+ } else {+ assertEquals(20, ((TermInSetQuery)q).getTermData().size());+ }// for point fields large filter query should use PointInSetQueryqParser = QParser.getParser("foo_pi:(1 2 3 4 5 6 7 8 9 10 20 19 18 17 16 15 14 13 12 11)", req);diff --git a/solr/core/src/test/org/apache/solr/search/TestTrieFacet.java b/solr/core/src/test/org/apache/solr/search/TestTrieFacet.javaindex 158965b6aac..67301c043d0 100644--- a/solr/core/src/test/org/apache/solr/search/TestTrieFacet.java+++ b/solr/core/src/test/org/apache/solr/search/TestTrieFacet.java@@ -52,6 +52,8 @@ public class TestTrieFacet extends SolrTestCaseJ4 {@BeforeClasspublic static void beforeClass() throws Exception {+ // we need DVs on point fields to compute stats & facets+ if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) System.setProperty(NUMERIC_DOCVALUES_SYSPROP,"true");initCore("solrconfig-tlog.xml","schema.xml");@@ -69,18 +71,20 @@ public class TestTrieFacet extends SolrTestCaseJ4 {SchemaField sf = h.getCore().getLatestSchema().getField(f);assertFalse("who changed the schema? test isn't valid: " + f, sf.multiValued());}-- for (String f : P0) {- SchemaField sf = h.getCore().getLatestSchema().getField(f);- assertEquals("who changed the schema? test isn't valid: " + f,- 0, assertCastFieldType(sf).getPrecisionStep());- }- for (String f : P8) {- SchemaField sf = h.getCore().getLatestSchema().getField(f);- assertEquals("who changed the schema? test isn't valid: " + f,- 8, assertCastFieldType(sf).getPrecisionStep());- }+ if (! Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) {+ for (String f : P0) {+ SchemaField sf = h.getCore().getLatestSchema().getField(f);+ assertEquals("who changed the schema? test isn't valid: " + f,+ 0, assertCastFieldType(sf).getPrecisionStep());+ }+ for (String f : P8) {+ SchemaField sf = h.getCore().getLatestSchema().getField(f);+ assertEquals("who changed the schema? test isn't valid: " + f,+ 8, assertCastFieldType(sf).getPrecisionStep());+ }+ }+// we don't need a lot of docs -- at least one failure only had ~1000NUM_DOCS = TestUtil.nextInt(random(), 200, 1500);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 57b3b9e102b..fbffd5c8748 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@@ -60,6 +60,9 @@ public class TestJsonFacets extends SolrTestCaseHS {// instead of the following, see the constructor//FacetField.FacetMethod.DEFAULT_METHOD = rand(FacetField.FacetMethod.values());+ // we need DVs on point fields to compute stats & facets+ if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) System.setProperty(NUMERIC_DOCVALUES_SYSPROP,"true");+initCore("solrconfig-tlog.xml","schema_latest.xml");}diff --git a/solr/core/src/test/org/apache/solr/search/function/TestFunctionQuery.java b/solr/core/src/test/org/apache/solr/search/function/TestFunctionQuery.javaindex f19e4b08530..4cee94b86bb 100644--- a/solr/core/src/test/org/apache/solr/search/function/TestFunctionQuery.java+++ b/solr/core/src/test/org/apache/solr/search/function/TestFunctionQuery.java@@ -293,6 +293,9 @@ public class TestFunctionQuery extends SolrTestCaseJ4 {@Testpublic void testExternalFileFieldNumericKey() throws Exception {+ assumeFalse("SOLR-10846: ExternalFileField/FileFloatSource throws NPE if keyField is Points based",+ Boolean.getBoolean(NUMERIC_POINTS_SYSPROP));+final String extField = "eff_trie";final String keyField = "eff_ti";assertU(adoc("id", "991", keyField, "91"));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 ff5d8a710b9..f0dac603134 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@@ -36,13 +36,14 @@ public class TestMinMaxOnMultiValuedField extends SolrTestCaseJ4 {/** Initializes core and does some sanity checking of schema */@BeforeClasspublic static void beforeClass() throws Exception {+initCore("solrconfig-functionquery.xml","schema11.xml");checkFields(new String[] {"i", "l", "f", "d"}, new String [] {"_p", "_ni_p"});checkFields(new String[] {"ti", "tl", "tf", "td"}, new String [] {"", "_dv", "_ni_dv"});}private static void checkFields(String[] types, String[] suffixes) {- // sanity check the expected properties of our fields (ie: who broke the schema?)+ // sanity check the expected properties of our fields (ie: who broke the schema?)IndexSchema schema = h.getCore().getLatestSchema();for (String type : types) {for (String suffix : suffixes) {@@ -50,7 +51,8 @@ public class TestMinMaxOnMultiValuedField extends SolrTestCaseJ4 {SchemaField sf = schema.getField(f);assertTrue(f + " is not multivalued", sf.multiValued());assertEquals(f + " doesn't have expected docValues status",- f.contains("dv") || sf.getType().isPointField(), sf.hasDocValues());+ f.contains("dv") || f.endsWith("_p")+ || Boolean.getBoolean(NUMERIC_DOCVALUES_SYSPROP), sf.hasDocValues());assertEquals(f + " doesn't have expected index status",! f.contains("ni"), sf.indexed());}@@ -222,17 +224,19 @@ public class TestMinMaxOnMultiValuedField extends SolrTestCaseJ4 {SolrException.ErrorCode.BAD_REQUEST);// useful error until/unless LUCENE-6709+ assertFalse(h.getCore().getLatestSchema().getField("val_is_ndv_p").hasDocValues());+ assertTrue(h.getCore().getLatestSchema().getField("val_is_ndv_p").multiValued());assertQEx("no error asking for max on a non docVals field",- "val_tds",- req("q","*:*", "fl", "field(val_tds,'max')"),+ "val_is_ndv_p",+ req("q","*:*", "fl", "field(val_is_ndv_p,'max')"),SolrException.ErrorCode.BAD_REQUEST);assertQEx("no error asking for max on a non docVals field","max",- req("q","*:*", "fl", "field(val_tds,'max')"),+ req("q","*:*", "fl", "field(val_is_ndv_p,'max')"),SolrException.ErrorCode.BAD_REQUEST);assertQEx("no error asking for max on a non docVals field","docValues",- req("q","*:*", "fl", "field(val_tds,'max')"),+ req("q","*:*", "fl", "field(val_is_ndv_p,'max')"),SolrException.ErrorCode.BAD_REQUEST);// useful error if min/max is unsupported for fieldtype@@ -245,15 +249,6 @@ public class TestMinMaxOnMultiValuedField extends SolrTestCaseJ4 {req("q","*:*", "fl", "field(cat_docValues,'max')"),SolrException.ErrorCode.BAD_REQUEST);- // MultiValued point field with dv=false- assertFalse(h.getCore().getLatestSchema().getField("val_is_ndv_p").hasDocValues());- assertTrue(h.getCore().getLatestSchema().getField("val_is_ndv_p").getType().isPointField());- assertTrue(h.getCore().getLatestSchema().getField("val_is_ndv_p").multiValued());- assertQEx("no error asking for non-dv point fields",- "docValues",- req("q","*:*", "fl", "field(val_is_ndv_p,'max')"),- SolrException.ErrorCode.BAD_REQUEST);-}public void testRandom() throws Exception {diff --git a/solr/core/src/test/org/apache/solr/update/DocumentBuilderTest.java b/solr/core/src/test/org/apache/solr/update/DocumentBuilderTest.javaindex 5d98d8be410..857dc651f2e 100644--- a/solr/core/src/test/org/apache/solr/update/DocumentBuilderTest.java+++ b/solr/core/src/test/org/apache/solr/update/DocumentBuilderTest.java@@ -131,8 +131,8 @@ public class DocumentBuilderTest extends SolrTestCaseJ4 {doc.addField( "home", "2.2,3.3" );Document out = DocumentBuilder.toDocument( doc, core.getLatestSchema() );assertNotNull( out.get( "home" ) );//contains the stored value and term vector, if there is one- assertNotNull( out.getField( "home_0" + FieldType.POLY_FIELD_SEPARATOR + System.getProperty("solr.tests.doubleClass", "pdouble") ) );- assertNotNull( out.getField( "home_1" + FieldType.POLY_FIELD_SEPARATOR + System.getProperty("solr.tests.doubleClass", "pdouble") ) );+ assertNotNull( out.getField( "home_0" + FieldType.POLY_FIELD_SEPARATOR + "double") );+ assertNotNull( out.getField( "home_1" + FieldType.POLY_FIELD_SEPARATOR + "double") );}/**diff --git a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.javaindex e9eefb01d6f..149745770f3 100644--- a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java+++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java@@ -43,7 +43,9 @@ import java.nio.file.Paths;import java.time.Instant;import java.util.ArrayList;import java.util.Arrays;+import java.util.Collections;import java.util.Comparator;+import java.util.Date;import java.util.HashMap;import java.util.HashSet;import java.util.Iterator;@@ -173,13 +175,6 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase {public static final String SYSTEM_PROPERTY_SOLR_TESTS_MERGEPOLICYFACTORY = "solr.tests.mergePolicyFactory";- /**- * The system property {@code "solr.tests.preferPointFields"} can be used to make tests use PointFields when possible.- * PointFields will only be used if the schema used by the tests uses "${solr.tests.TYPEClass}" when defining fields.- * If this environment variable is not set, those tests will use PointFields 50% of the times and TrieFields the rest.- */- public static final boolean PREFER_POINT_FIELDS = Boolean.getBoolean("solr.tests.preferPointFields");-private static String coreName = DEFAULT_TEST_CORENAME;public static int DEFAULT_CONNECTION_TIMEOUT = 60000; // default socket connection timeout in ms@@ -314,6 +309,8 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase {System.clearProperty("solr.cloud.wait-for-updates-with-stale-state-pause");HttpClientUtil.resetHttpClientBuilder();+ clearNumericTypesProperties();+// clean up staticsslConfig = null;testSolrHome = null;@@ -510,22 +507,7 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase {mergeSchedulerClass = "org.apache.lucene.index.ConcurrentMergeScheduler";}System.setProperty("solr.tests.mergeScheduler", mergeSchedulerClass);- if (RandomizedContext.current().getTargetClass().isAnnotationPresent(SuppressPointFields.class)- || (!PREFER_POINT_FIELDS && random().nextBoolean())) {- log.info("Using TrieFields");- System.setProperty("solr.tests.intClass", "int");- System.setProperty("solr.tests.longClass", "long");- System.setProperty("solr.tests.doubleClass", "double");- System.setProperty("solr.tests.floatClass", "float");- System.setProperty("solr.tests.dateClass", "date");- } else {- log.info("Using PointFields");- System.setProperty("solr.tests.intClass", "pint");- System.setProperty("solr.tests.longClass", "plong");- System.setProperty("solr.tests.doubleClass", "pdouble");- System.setProperty("solr.tests.floatClass", "pfloat");- System.setProperty("solr.tests.dateClass", "pdate");- }+ randomizeNumericTypesProperties();}public static Throwable getWrappedException(Throwable e) {@@ -2485,4 +2467,127 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase {protected <T> T pickRandom(T... options) {return options[random().nextInt(options.length)];}++ /**+ * The name of a sysprop that can be set by users when running tests to force the types of numerics+ * used for test classes that do not have the {@link SuppressPointFields} annotation:+ * <ul>+ * <li>If unset, then a random variable will be used to decide the type of numerics.</li>+ * <li>If set to <code>true</code> then Points based numerics will be used.</li>+ * <li>If set to <code>false</code> (or any other string) then Trie based numerics will be used.</li>+ * </ul>+ * @see #NUMERIC_POINTS_SYSPROP+ */+ public static final String USE_NUMERIC_POINTS_SYSPROP = "solr.tests.use.numeric.points";++ /**+ * The name of a sysprop that will either <code>true</code> or <code>false</code> indicating if+ * numeric points fields are currently in use, depending on the user specified value of+ * {@link #USE_NUMERIC_POINTS_SYSPROP} and/or the {@link SuppressPointFields} annotation and/or+ * randomization. Tests can use <code>Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)</code>.+ *+ * @see #randomizeNumericTypesProperties+ */+ public static final String NUMERIC_POINTS_SYSPROP = "solr.tests.numeric.points";++ /**+ * The name of a sysprop that will be either <code>true</code> or <code>false</code> indicating if+ * docValues should be used on a numeric field. This property string should be used in the+ * <code>docValues</code> attribute of (most) numeric fieldTypes in schemas, and by default will be+ * randomized by this class in a <code>@BeforeClass</code>. Subclasses that need to force specific+ * behavior can use <code>System.setProperty(NUMERIC_DOCVALUES_SYSPROP,"true")</code>+ * to override the default randomization.+ *+ * @see #randomizeNumericTypesProperties+ */+ public static final String NUMERIC_DOCVALUES_SYSPROP = "solr.tests.numeric.dv";++ /**+ * Sets various sys props related to user specified or randomized choices regarding the types+ * of numerics that should be used in tests.+ * <p>+ * TODO: This method can be private once SOLR-10916 is resolved+ * </p>+ * @see #NUMERIC_DOCVALUES_SYSPROP+ * @see #NUMERIC_POINTS_SYSPROP+ * @see #clearNumericTypesProperties+ * @lucene.experimental+ * @lucene.internal+ */+ public static void randomizeNumericTypesProperties() {++ final boolean useDV = random().nextBoolean();+ System.setProperty(NUMERIC_DOCVALUES_SYSPROP, ""+useDV);++ // consume a consistent amount of random data even if sysprop/annotation is set+ final boolean randUsePoints = random().nextBoolean();++ final String usePointsStr = System.getProperty(USE_NUMERIC_POINTS_SYSPROP);+ final boolean usePoints = (null == usePointsStr) ? randUsePoints : Boolean.parseBoolean(usePointsStr);++ if (RandomizedContext.current().getTargetClass().isAnnotationPresent(SolrTestCaseJ4.SuppressPointFields.class)+ || (! usePoints)) {+ log.info("Using TrieFields (NUMERIC_POINTS_SYSPROP=false) w/NUMERIC_DOCVALUES_SYSPROP="+useDV);++ org.apache.solr.schema.PointField.TEST_HACK_IGNORE_USELESS_TRIEFIELD_ARGS = false;+ private_RANDOMIZED_NUMERIC_FIELDTYPES.put(Integer.class, "solr.TrieIntField");+ private_RANDOMIZED_NUMERIC_FIELDTYPES.put(Float.class, "solr.TrieFloatField");+ private_RANDOMIZED_NUMERIC_FIELDTYPES.put(Long.class, "solr.TrieLongField");+ private_RANDOMIZED_NUMERIC_FIELDTYPES.put(Double.class, "solr.TrieDoubleField");+ private_RANDOMIZED_NUMERIC_FIELDTYPES.put(Date.class, "solr.TrieDateField");++ System.setProperty(NUMERIC_POINTS_SYSPROP, "false");+ } else {+ log.info("Using PointFields (NUMERIC_POINTS_SYSPROP=true) w/NUMERIC_DOCVALUES_SYSPROP="+useDV);++ org.apache.solr.schema.PointField.TEST_HACK_IGNORE_USELESS_TRIEFIELD_ARGS = true;+ private_RANDOMIZED_NUMERIC_FIELDTYPES.put(Integer.class, "solr.IntPointField");+ private_RANDOMIZED_NUMERIC_FIELDTYPES.put(Float.class, "solr.FloatPointField");+ private_RANDOMIZED_NUMERIC_FIELDTYPES.put(Long.class, "solr.LongPointField");+ private_RANDOMIZED_NUMERIC_FIELDTYPES.put(Double.class, "solr.DoublePointField");+ private_RANDOMIZED_NUMERIC_FIELDTYPES.put(Date.class, "solr.DatePointField");++ System.setProperty(NUMERIC_POINTS_SYSPROP, "true");+ }+ for (Map.Entry<Class,String> entry : RANDOMIZED_NUMERIC_FIELDTYPES.entrySet()) {+ System.setProperty("solr.tests." + entry.getKey().getSimpleName() + "FieldType",+ entry.getValue());++ }+ }++ /**+ * Cleans up the randomized sysproperties and variables set by {@link #randomizeNumericTypesProperties}+ * <p>+ * TODO: This method can be private once SOLR-10916 is resolved+ * </p>+ * @see #randomizeNumericTypesProperties+ * @lucene.experimental+ * @lucene.internal+ */+ public static void clearNumericTypesProperties() {+ org.apache.solr.schema.PointField.TEST_HACK_IGNORE_USELESS_TRIEFIELD_ARGS = false;+ System.clearProperty("solr.tests.numeric.points");+ System.clearProperty("solr.tests.numeric.points.dv");+ for (Class c : RANDOMIZED_NUMERIC_FIELDTYPES.keySet()) {+ System.clearProperty("solr.tests." + c.getSimpleName() + "FieldType");+ }+ private_RANDOMIZED_NUMERIC_FIELDTYPES.clear();+ }++ private static final Map<Class,String> private_RANDOMIZED_NUMERIC_FIELDTYPES = new HashMap<>();++ /**+ * A Map of "primative" java "numeric" types and the string name of the <code>class</code> used in the+ * corrisponding schema fieldType declaration.+ * <p>+ * Example: <code>java.util.Date => "solr.DatePointField"</code>+ * </p>+ *+ * @see #randomizeNumericTypesProperties+ */+ protected static final Map<Class,String> RANDOMIZED_NUMERIC_FIELDTYPES+ = Collections.unmodifiableMap(private_RANDOMIZED_NUMERIC_FIELDTYPES);++}