lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hoss...@apache.org
Subject lucene-solr:master: SOLR-11102: Randomize PointFields in schema-rest.xml and all affected tests
Date Tue, 18 Jul 2017 17:50:28 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/master dd5be42e6 -> 8ecbb9725


SOLR-11102: Randomize PointFields in schema-rest.xml and all affected tests


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

Branch: refs/heads/master
Commit: 8ecbb972566856fa49c707870968e8a68e614dca
Parents: dd5be42
Author: Chris Hostetter <hossman@apache.org>
Authored: Tue Jul 18 10:50:23 2017 -0700
Committer: Chris Hostetter <hossman@apache.org>
Committed: Tue Jul 18 10:50:23 2017 -0700

----------------------------------------------------------------------
 solr/CHANGES.txt                                |  1 +
 .../solr/collection1/conf/schema-rest.xml       | 20 ++++++++++----------
 .../rest/schema/TestDynamicFieldResource.java   |  6 ++++--
 .../solr/rest/schema/TestFieldTypeResource.java | 12 ++++++++----
 4 files changed, 23 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8ecbb972/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 0e4bb42..4a42f75 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -505,6 +505,7 @@ Other Changes
   - SOLR-11105: Randomize PointFields in "cloud-minimal-jmx" and "cloud-minimal-inplace-updates"
test configsets (Steve Rowe)
   - SOLR-11109: Randomize PointFields in "cloud-subdirs" and "configset-2" test configsets
(Steve Rowe)
   - SOLR-11110: Randomize PointFields in "cloud-managed" and "cloud-managed-upgrade" test
configsets (Steve Rowe)
+  - SOLR-11102: Randomize PointFields in schema-rest.xml and all affected tests (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/8ecbb972/solr/core/src/test-files/solr/collection1/conf/schema-rest.xml
----------------------------------------------------------------------
diff --git a/solr/core/src/test-files/solr/collection1/conf/schema-rest.xml b/solr/core/src/test-files/solr/collection1/conf/schema-rest.xml
index 89c2623..5e2ac21 100644
--- a/solr/core/src/test-files/solr/collection1/conf/schema-rest.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/schema-rest.xml
@@ -31,15 +31,15 @@
        1.5: omitNorms defaults to true for primitive field types (int, float, boolean, string...)
        1.6: useDocValuesAsStored defaults to true.
      -->
-  <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"/>
 
-  <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}" docValues="${solr.tests.numeric.dv}"
precisionStep="8" positionIncrementGap="0"/>
+  <fieldType name="tfloat" class="${solr.tests.FloatFieldType}" docValues="${solr.tests.numeric.dv}"
precisionStep="8" positionIncrementGap="0"/>
+  <fieldType name="tlong" class="${solr.tests.LongFieldType}" docValues="${solr.tests.numeric.dv}"
precisionStep="8" positionIncrementGap="0"/>
+  <fieldType name="tdouble" class="${solr.tests.DoubleFieldType}" docValues="${solr.tests.numeric.dv}"
precisionStep="8" positionIncrementGap="0"/>
 
   <!-- Field type demonstrating an Analyzer failure -->
   <fieldType name="failtype1" class="solr.TextField">
@@ -96,8 +96,8 @@
   <!-- format for date is 1995-12-31T23:59:59.999Z and only the fractional
        seconds 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">

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8ecbb972/solr/core/src/test/org/apache/solr/rest/schema/TestDynamicFieldResource.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/rest/schema/TestDynamicFieldResource.java
b/solr/core/src/test/org/apache/solr/rest/schema/TestDynamicFieldResource.java
index 7ca7953..79b1bf0 100644
--- a/solr/core/src/test/org/apache/solr/rest/schema/TestDynamicFieldResource.java
+++ b/solr/core/src/test/org/apache/solr/rest/schema/TestDynamicFieldResource.java
@@ -21,13 +21,14 @@ import org.junit.Test;
 public class TestDynamicFieldResource extends SolrRestletTestBase {
   @Test
   public void testGetDynamicField() throws Exception {
+    final boolean expectedDocValues = Boolean.getBoolean(NUMERIC_DOCVALUES_SYSPROP);
     assertQ("/schema/dynamicfields/*_i?indent=on&wt=xml&showDefaults=on",
             "count(/response/lst[@name='dynamicField']) = 1",
             "/response/lst[@name='dynamicField']/str[@name='name'] = '*_i'",
             "/response/lst[@name='dynamicField']/str[@name='type'] = 'int'",
             "/response/lst[@name='dynamicField']/bool[@name='indexed'] = 'true'",
             "/response/lst[@name='dynamicField']/bool[@name='stored'] = 'true'",
-            "/response/lst[@name='dynamicField']/bool[@name='docValues'] = 'false'",
+            "/response/lst[@name='dynamicField']/bool[@name='docValues'] = '"+expectedDocValues+"'",
             "/response/lst[@name='dynamicField']/bool[@name='termVectors'] = 'false'",
             "/response/lst[@name='dynamicField']/bool[@name='termPositions'] = 'false'",
             "/response/lst[@name='dynamicField']/bool[@name='termOffsets'] = 'false'",
@@ -50,12 +51,13 @@ public class TestDynamicFieldResource extends SolrRestletTestBase {
   
   @Test
   public void testJsonGetDynamicField() throws Exception {
+    final boolean expectedDocValues = Boolean.getBoolean(NUMERIC_DOCVALUES_SYSPROP);
     assertJQ("/schema/dynamicfields/*_i?indent=on&showDefaults=on",
              "/dynamicField/name=='*_i'",
              "/dynamicField/type=='int'",
              "/dynamicField/indexed==true",
              "/dynamicField/stored==true",
-             "/dynamicField/docValues==false",
+             "/dynamicField/docValues=="+expectedDocValues,
              "/dynamicField/termVectors==false",
              "/dynamicField/termPositions==false",
              "/dynamicField/termOffsets==false",

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8ecbb972/solr/core/src/test/org/apache/solr/rest/schema/TestFieldTypeResource.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/rest/schema/TestFieldTypeResource.java b/solr/core/src/test/org/apache/solr/rest/schema/TestFieldTypeResource.java
index b66ffc1..a1beb99 100644
--- a/solr/core/src/test/org/apache/solr/rest/schema/TestFieldTypeResource.java
+++ b/solr/core/src/test/org/apache/solr/rest/schema/TestFieldTypeResource.java
@@ -22,15 +22,17 @@ import org.junit.Test;
 public class TestFieldTypeResource extends SolrRestletTestBase {
   @Test
   public void testGetFieldType() throws Exception {
+    final String expectedFloatClass = RANDOMIZED_NUMERIC_FIELDTYPES.get(Float.class);
+    final boolean expectedDocValues = Boolean.getBoolean(NUMERIC_DOCVALUES_SYSPROP);
     assertQ("/schema/fieldtypes/float?indent=on&wt=xml&showDefaults=true",
             "count(/response/lst[@name='fieldType']) = 1",
             "count(/response/lst[@name='fieldType']/*) = 17",
             "/response/lst[@name='fieldType']/str[@name='name'] = 'float'",
-            "/response/lst[@name='fieldType']/str[@name='class'] = 'solr.TrieFloatField'",
+            "/response/lst[@name='fieldType']/str[@name='class'] = '"+expectedFloatClass+"'",
             "/response/lst[@name='fieldType']/str[@name='precisionStep'] ='0'",
             "/response/lst[@name='fieldType']/bool[@name='indexed'] = 'true'",
             "/response/lst[@name='fieldType']/bool[@name='stored'] = 'true'",
-            "/response/lst[@name='fieldType']/bool[@name='docValues'] = 'false'",
+            "/response/lst[@name='fieldType']/bool[@name='docValues'] = '"+expectedDocValues+"'",
             "/response/lst[@name='fieldType']/bool[@name='termVectors'] = 'false'",
             "/response/lst[@name='fieldType']/bool[@name='termPositions'] = 'false'",
             "/response/lst[@name='fieldType']/bool[@name='termOffsets'] = 'false'",
@@ -53,13 +55,15 @@ public class TestFieldTypeResource extends SolrRestletTestBase {
 
   @Test
   public void testJsonGetFieldType() throws Exception {
+    final String expectedFloatClass = RANDOMIZED_NUMERIC_FIELDTYPES.get(Float.class);
+    final boolean expectedDocValues = Boolean.getBoolean(NUMERIC_DOCVALUES_SYSPROP);
     assertJQ("/schema/fieldtypes/float?indent=on&showDefaults=on",  // assertJQ will
add "&wt=json"
              "/fieldType/name=='float'",
-             "/fieldType/class=='solr.TrieFloatField'",
+             "/fieldType/class=='"+expectedFloatClass+"'",
              "/fieldType/precisionStep=='0'",
              "/fieldType/indexed==true",
              "/fieldType/stored==true",
-             "/fieldType/docValues==false",
+             "/fieldType/docValues=="+expectedDocValues,
              "/fieldType/termVectors==false",
              "/fieldType/termPositions==false",
              "/fieldType/termOffsets==false",


Mime
View raw message