SOLR-10979: Randomize PointFields in schema-docValues*.xml and all affected tests

This commit is contained in:
Chris Hostetter 2017-06-29 15:09:39 -07:00
parent b7fb61d7b9
commit 0159d494f5
7 changed files with 33 additions and 28 deletions

View File

@ -363,6 +363,7 @@ Other Changes
- SOLR-10970: Randomize PointFields in all tests using schema-*sort* files (hossman) - SOLR-10970: Randomize PointFields in all tests using schema-*sort* files (hossman)
- SOLR-10971: Randomize PointFields in CdcrBootstrapTest (hossman) - SOLR-10971: Randomize PointFields in CdcrBootstrapTest (hossman)
- SOLR-10977: Randomize the usage of Points based numerics in schema15.xml and all impacted tests (hossman) - SOLR-10977: Randomize the usage of Points based numerics in schema15.xml and all impacted tests (hossman)
- SOLR-10979: Randomize PointFields in schema-docValues*.xml and all affected tests (hossman)
* SOLR-6807: Changed requestDispatcher's handleSelect to default to false, thus ignoring "qt". * SOLR-6807: Changed requestDispatcher's handleSelect to default to false, thus ignoring "qt".
Simplified configs to not refer to handleSelect or "qt". Switch all tests that assumed true to assume false Simplified configs to not refer to handleSelect or "qt". Switch all tests that assumed true to assume false

View File

@ -38,14 +38,14 @@
These are provided more for backward compatability, allowing one These are provided more for backward compatability, allowing one
to create a schema that matches an existing lucene index. to create a schema that matches an existing lucene index.
--> -->
<fieldType name="int" class="solr.TrieIntField" 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.TrieFloatField" 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.TrieLongField" 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.TrieDoubleField" 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 fractional <!-- format for date is 1995-12-31T23:59:59.999Z and only the fractional
seconds part (.999) is optional. seconds part (.999) is optional.
--> -->
<fieldType name="date" class="solr.TrieDateField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/> <fieldType name="date" class="${solr.tests.DateFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="boolean" class="solr.BoolField"/> <fieldType name="boolean" class="solr.BoolField"/>
<fieldType name="string" class="solr.StrField"/> <fieldType name="string" class="solr.StrField"/>

View File

@ -17,11 +17,11 @@
--> -->
<schema name="test" version="1.6"> <schema name="test" version="1.6">
<fieldType name="int" class="${solr.tests.IntegerFieldType}" 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}" 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}" 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}" 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="date" class="${solr.tests.DateFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/> <fieldType name="date" class="${solr.tests.DateFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="string" class="solr.StrField" sortMissingLast="true"/> <fieldType name="string" class="solr.StrField" sortMissingLast="true"/>
<fieldType name="pint" class="solr.IntPointField"/> <fieldType name="pint" class="solr.IntPointField"/>

View File

@ -29,11 +29,11 @@
1.5: omitNorms defaults to true for primitive field types (int, float, boolean, string...) 1.5: omitNorms defaults to true for primitive field types (int, float, boolean, string...)
1.6: useDocValuesAsStored defaults to true. 1.6: useDocValuesAsStored defaults to true.
--> -->
<fieldType name="int" class="solr.TrieIntField" 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.TrieFloatField" 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.TrieLongField" 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.TrieDoubleField" 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="date" class="solr.TrieDateField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/> <fieldType name="date" class="${solr.tests.DateFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
<fieldtype name="string" class="solr.StrField" sortMissingLast="true" useDocValuesAsStored="false"/> <fieldtype name="string" class="solr.StrField" sortMissingLast="true" useDocValuesAsStored="false"/>
<fieldType name="text" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true"> <fieldType name="text" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
<analyzer type="index"> <analyzer type="index">

View File

@ -19,11 +19,11 @@
<!-- schema file for testing sorting/faceting/functions on single-valued DV with missing values --> <!-- schema file for testing sorting/faceting/functions on single-valued DV with missing values -->
<schema name="schema-docValuesMissing" version="1.6"> <schema name="schema-docValuesMissing" version="1.6">
<fieldType name="int" class="solr.TrieIntField" 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.TrieFloatField" 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.TrieLongField" 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.TrieDoubleField" 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="date" class="solr.TrieDateField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/> <fieldType name="date" class="${solr.tests.DateFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="string" class="solr.StrField"/> <fieldType name="string" class="solr.StrField"/>
<fieldType name="boolean" class="solr.BoolField"/> <fieldType name="boolean" class="solr.BoolField"/>

View File

@ -18,14 +18,14 @@
<schema name="schema-docValuesMulti" version="1.6"> <schema name="schema-docValuesMulti" version="1.6">
<fieldType name="int" class="solr.TrieIntField" 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.TrieFloatField" 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.TrieLongField" 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.TrieDoubleField" 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 fractional <!-- format for date is 1995-12-31T23:59:59.999Z and only the fractional
seconds part (.999) is optional. seconds part (.999) is optional.
--> -->
<fieldType name="date" class="solr.TrieDateField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/> <fieldType name="date" class="${solr.tests.DateFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="boolean" class="solr.BoolField"/> <fieldType name="boolean" class="solr.BoolField"/>
<fieldType name="string" class="solr.StrField"/> <fieldType name="string" class="solr.StrField"/>

View File

@ -55,6 +55,10 @@ public class DocValuesMultiTest extends SolrTestCaseJ4 {
@Test @Test
public void testDocValues() throws IOException { public void testDocValues() throws IOException {
final DocValuesType expectedNumericDvType = Boolean.getBoolean(NUMERIC_POINTS_SYSPROP) ?
DocValuesType.SORTED_NUMERIC : DocValuesType.SORTED_SET;
assertU(adoc("id", "1", "floatdv", "4.5", "intdv", "-1", "intdv", "3", assertU(adoc("id", "1", "floatdv", "4.5", "intdv", "-1", "intdv", "3",
"stringdv", "value1", "stringdv", "value2", "stringdv", "value1", "stringdv", "value2",
"booldv", "false", "booldv", "true")); "booldv", "false", "booldv", "true"));
@ -68,8 +72,8 @@ public class DocValuesMultiTest extends SolrTestCaseJ4 {
final FieldInfos infos = reader.getFieldInfos(); final FieldInfos infos = reader.getFieldInfos();
assertEquals(DocValuesType.SORTED_SET, infos.fieldInfo("stringdv").getDocValuesType()); assertEquals(DocValuesType.SORTED_SET, infos.fieldInfo("stringdv").getDocValuesType());
assertEquals(DocValuesType.SORTED_SET, infos.fieldInfo("booldv").getDocValuesType()); assertEquals(DocValuesType.SORTED_SET, infos.fieldInfo("booldv").getDocValuesType());
assertEquals(DocValuesType.SORTED_SET, infos.fieldInfo("floatdv").getDocValuesType()); assertEquals(expectedNumericDvType, infos.fieldInfo("floatdv").getDocValuesType());
assertEquals(DocValuesType.SORTED_SET, infos.fieldInfo("intdv").getDocValuesType()); assertEquals(expectedNumericDvType, infos.fieldInfo("intdv").getDocValuesType());
SortedSetDocValues dv = reader.getSortedSetDocValues("stringdv"); SortedSetDocValues dv = reader.getSortedSetDocValues("stringdv");
assertEquals(0, dv.nextDoc()); assertEquals(0, dv.nextDoc());