You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ho...@apache.org on 2017/07/19 00:44:23 UTC

[2/2] lucene-solr:branch_7_0: SOLR-11121: Randomize PointFields in schema-trie.xml and TestTrie

SOLR-11121: Randomize PointFields in schema-trie.xml and TestTrie

(cherry picked from commit 49ff81756d0fb0379086d9e6891fbd3bdf3e6f3d)


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/e46ccc4c
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/e46ccc4c
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/e46ccc4c

Branch: refs/heads/branch_7_0
Commit: e46ccc4c0f2c0b8fb975b2207e078f6b46ff7423
Parents: 404d895
Author: Chris Hostetter <ho...@apache.org>
Authored: Tue Jul 18 17:28:21 2017 -0700
Committer: Chris Hostetter <ho...@apache.org>
Committed: Tue Jul 18 17:37:16 2017 -0700

----------------------------------------------------------------------
 solr/CHANGES.txt                                |  1 +
 .../solr/collection1/conf/schema-trie.xml       | 22 ++++++++++----------
 .../core/src/test/org/apache/solr/TestTrie.java |  5 +++++
 3 files changed, 17 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e46ccc4c/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 54c2eb2..4dcba6d 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -438,6 +438,7 @@ Other Changes
   - SOLR-11113: Randomize PointFields in analysis-err-schema.xml, schema-hash.xml, and all affected tests (hossman)
   - SOLR-11114: Randomize PointFields in schema-customfield.xml and TestOverriddenPrefixQueryForCustomFieldType (hossman)
   - SOLR-11074: Randomize PointFields in cloud-dynamic configset and all related tests (Anshum Gupta)
+  - SOLR-11121: Randomize PointFields in schema-trie.xml and TestTrie (hossman)
 
 * SOLR-6807: Changed requestDispatcher's handleSelect to default to false, thus ignoring "qt".
   Simplified configs to not refer to handleSelect or "qt".  Switch all tests that assumed true to assume false

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e46ccc4c/solr/core/src/test-files/solr/collection1/conf/schema-trie.xml
----------------------------------------------------------------------
diff --git a/solr/core/src/test-files/solr/collection1/conf/schema-trie.xml b/solr/core/src/test-files/solr/collection1/conf/schema-trie.xml
index 525ea51..cc0ff03 100644
--- a/solr/core/src/test-files/solr/collection1/conf/schema-trie.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/schema-trie.xml
@@ -68,24 +68,24 @@
        field first in an ascending sort and last in a descending sort.
   -->
 
-  <fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
-  <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
-  <fieldType name="long" class="solr.TrieLongField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
-  <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
+  <fieldType name="int" class="${solr.tests.IntegerFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
+  <fieldType name="float" class="${solr.tests.FloatFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
+  <fieldType name="long" class="${solr.tests.LongFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
+  <fieldType name="double" class="${solr.tests.DoubleFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
 
-  <fieldType name="tint" class="solr.TrieIntField" omitNorms="true" positionIncrementGap="0" indexed="true"
+  <fieldType name="tint" class="${solr.tests.IntegerFieldType}" docValues="${solr.tests.numeric.dv}" omitNorms="true" positionIncrementGap="0" indexed="true"
              stored="false"/>
-  <fieldType name="tfloat" class="solr.TrieFloatField" omitNorms="true" positionIncrementGap="0" indexed="true"
+  <fieldType name="tfloat" class="${solr.tests.FloatFieldType}" docValues="${solr.tests.numeric.dv}" omitNorms="true" positionIncrementGap="0" indexed="true"
              stored="false"/>
-  <fieldType name="tlong" class="solr.TrieLongField" omitNorms="true" positionIncrementGap="0" indexed="true"
+  <fieldType name="tlong" class="${solr.tests.LongFieldType}" docValues="${solr.tests.numeric.dv}" omitNorms="true" positionIncrementGap="0" indexed="true"
              stored="false"/>
-  <fieldType name="tdouble" class="solr.TrieDoubleField" omitNorms="true" positionIncrementGap="0" indexed="true"
+  <fieldType name="tdouble" class="${solr.tests.DoubleFieldType}" docValues="${solr.tests.numeric.dv}" omitNorms="true" positionIncrementGap="0" indexed="true"
              stored="false"/>
 
-  <fieldType name="tdouble4" class="solr.TrieDoubleField" type="double" precisionStep="4" omitNorms="true"
+  <fieldType name="tdouble4" class="${solr.tests.DoubleFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="4" omitNorms="true"
              positionIncrementGap="0" indexed="true" stored="false"/>
 
-  <fieldType name="tdate" class="solr.TrieDateField" omitNorms="true" positionIncrementGap="0" indexed="true"
+  <fieldType name="tdate" class="${solr.tests.DateFieldType}" docValues="${solr.tests.numeric.dv}" omitNorms="true" positionIncrementGap="0" indexed="true"
              stored="false"/>
 
 
@@ -109,7 +109,7 @@
 
        Consult the TrieDateField javadocs for more information.
     -->
-  <fieldType name="date" class="solr.TrieDateField" sortMissingLast="true" omitNorms="true"/>
+  <fieldType name="date" class="${solr.tests.DateFieldType}" docValues="${solr.tests.numeric.dv}" sortMissingLast="true" omitNorms="true"/>
 
 
   <!-- The "RandomSortField" is not used to store or search any

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e46ccc4c/solr/core/src/test/org/apache/solr/TestTrie.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/TestTrie.java b/solr/core/src/test/org/apache/solr/TestTrie.java
index 47c50b2..e7c2a33 100644
--- a/solr/core/src/test/org/apache/solr/TestTrie.java
+++ b/solr/core/src/test/org/apache/solr/TestTrie.java
@@ -211,6 +211,11 @@ public class TestTrie extends SolrTestCaseJ4 {
 
   @Test
   public void testTrieFacet_PrecisionStep() throws Exception {
+    if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) {
+      assumeTrue("Skipping test: Points+facets require docValues, but randomizer: points=true && DV=false",
+                 Boolean.getBoolean(NUMERIC_DOCVALUES_SYSPROP));
+    }
+    
     // Future protect - assert 0<precisionStep<64
     checkPrecisionSteps("tint");
     checkPrecisionSteps("tfloat");