You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by tf...@apache.org on 2016/10/15 23:55:32 UTC

[20/24] lucene-solr:jira/solr-8396: Removed SortedSetDV from PointFields. MultiValued fields with DocValues are not supported

Removed SortedSetDV from PointFields. MultiValued fields with DocValues are not supported


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

Branch: refs/heads/jira/solr-8396
Commit: ebcfc2317e3cfa208a51a35d332471f22ec99e57
Parents: 6d39d66
Author: Tomas Fernandez Lobbe <tf...@apache.org>
Authored: Sat Oct 15 08:41:31 2016 -0700
Committer: Tomas Fernandez Lobbe <tf...@apache.org>
Committed: Sat Oct 15 08:41:31 2016 -0700

----------------------------------------------------------------------
 lucene/common-build.xml                         |  1 +
 .../apache/solr/schema/DoublePointField.java    | 83 +-------------------
 .../org/apache/solr/schema/IntPointField.java   | 83 +-------------------
 .../java/org/apache/solr/schema/PointField.java | 26 ++----
 .../test-files/solr/collection1/conf/schema.xml |  6 +-
 .../solr/collection1/conf/schema11.xml          |  2 +-
 .../solr/collection1/conf/schema_latest.xml     |  8 +-
 .../test/org/apache/solr/TestPointFields.java   | 23 ++++--
 .../java/org/apache/solr/SolrTestCaseJ4.java    | 13 ++-
 9 files changed, 45 insertions(+), 200 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ebcfc231/lucene/common-build.xml
----------------------------------------------------------------------
diff --git a/lucene/common-build.xml b/lucene/common-build.xml
index 0fa6b3f..ba0a059 100644
--- a/lucene/common-build.xml
+++ b/lucene/common-build.xml
@@ -251,6 +251,7 @@
     <propertyref name="lucene.javadoc.url"/><!-- for Solr -->
     <propertyref name="tests.totals.tmpfile" />
     <propertyref name="git-autoclean.disabled"/>
+    <propertyref name="solr.tests.preferPointFields"/>
   </propertyset>
 
   <patternset id="lucene.local.src.package.patterns"

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ebcfc231/solr/core/src/java/org/apache/solr/schema/DoublePointField.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/schema/DoublePointField.java b/solr/core/src/java/org/apache/solr/schema/DoublePointField.java
index c01728b..487f86c 100644
--- a/solr/core/src/java/org/apache/solr/schema/DoublePointField.java
+++ b/solr/core/src/java/org/apache/solr/schema/DoublePointField.java
@@ -17,30 +17,18 @@
 
 package org.apache.solr.schema;
 
-import java.io.IOException;
 import java.lang.invoke.MethodHandles;
-import java.util.Map;
 
 import org.apache.lucene.document.DoublePoint;
 import org.apache.lucene.document.StoredField;
-import org.apache.lucene.index.DocValues;
 import org.apache.lucene.index.IndexableField;
-import org.apache.lucene.index.LeafReaderContext;
-import org.apache.lucene.index.SortedDocValues;
-import org.apache.lucene.index.SortedSetDocValues;
 import org.apache.lucene.legacy.LegacyNumericType;
-import org.apache.lucene.queries.function.FunctionValues;
 import org.apache.lucene.queries.function.ValueSource;
-import org.apache.lucene.queries.function.docvalues.DoubleDocValues;
 import org.apache.lucene.queries.function.valuesource.DoubleFieldSource;
-import org.apache.lucene.queries.function.valuesource.SortedSetFieldSource;
 import org.apache.lucene.search.Query;
 import org.apache.lucene.search.SortField;
-import org.apache.lucene.search.SortedSetSelector;
 import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.BytesRefBuilder;
-import org.apache.lucene.util.mutable.MutableValue;
-import org.apache.lucene.util.mutable.MutableValueDouble;
 import org.apache.solr.search.QParser;
 import org.apache.solr.uninverting.UninvertingReader.Type;
 import org.slf4j.Logger;
@@ -89,74 +77,6 @@ public class DoublePointField extends PointField implements DoubleValueFieldType
   }
 
   @Override
-  protected ValueSource getSingleValueSource(SortedSetSelector.Type choice, SchemaField f) {
-    return new SortedSetFieldSource(f.getName(), choice) {
-      @Override
-      public FunctionValues getValues(Map context, LeafReaderContext readerContext) throws IOException {
-        SortedSetFieldSource thisAsSortedSetFieldSource = this; // needed for nested anon class ref
-
-        SortedSetDocValues sortedSet = DocValues.getSortedSet(readerContext.reader(), field);
-        SortedDocValues view = SortedSetSelector.wrap(sortedSet, selector);
-
-        return new DoubleDocValues(thisAsSortedSetFieldSource) {
-          private int lastDocID;
-
-          private boolean setDoc(int docID) throws IOException {
-            if (docID < lastDocID) {
-              throw new IllegalArgumentException("docs out of order: lastDocID=" + lastDocID + " docID=" + docID);
-            }
-            if (docID > view.docID()) {
-              return docID == view.advance(docID);
-            } else {
-              return docID == view.docID();
-            }
-          }
-          
-          @Override
-          public double doubleVal(int doc) throws IOException {
-            if (setDoc(doc)) {
-              BytesRef bytes = view.binaryValue();
-              assert bytes.length > 0;
-              return DoublePoint.decodeDimension(bytes.bytes, bytes.offset);
-            } else {
-              return 0D;
-            }
-          }
-
-          @Override
-          public boolean exists(int doc) throws IOException {
-            return setDoc(doc);
-          }
-
-          @Override
-          public ValueFiller getValueFiller() {
-            return new ValueFiller() {
-              private final MutableValueDouble mval = new MutableValueDouble();
-              
-              @Override
-              public MutableValue getValue() {
-                return mval;
-              }
-              
-              @Override
-              public void fillValue(int doc) throws IOException {
-                if (setDoc(doc)) {
-                  BytesRef bytes = view.binaryValue();
-                  mval.exists = true;
-                  mval.value = DoublePoint.decodeDimension(bytes.bytes, bytes.offset);
-                } else {
-                  mval.exists = false;
-                  mval.value = 0;
-                }
-              }
-            };
-          }
-        };
-      }
-    };
-  }
-
-  @Override
   public Object toObject(SchemaField sf, BytesRef term) {
     return DoublePoint.decodeDimension(term.bytes, term.offset);
   }
@@ -208,7 +128,8 @@ public class DoublePointField extends PointField implements DoubleValueFieldType
   @Override
   public Type getUninversionType(SchemaField sf) {
     if (sf.multiValued()) {
-      return Type.SORTED_SET_DOUBLE;
+      throw new UnsupportedOperationException("MultiValued Point fields with DocValues is not currently supported");
+//      return Type.SORTED_DOUBLE;
     } else {
       return Type.DOUBLE_POINT;
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ebcfc231/solr/core/src/java/org/apache/solr/schema/IntPointField.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/schema/IntPointField.java b/solr/core/src/java/org/apache/solr/schema/IntPointField.java
index 4f31a79..893f9bf 100644
--- a/solr/core/src/java/org/apache/solr/schema/IntPointField.java
+++ b/solr/core/src/java/org/apache/solr/schema/IntPointField.java
@@ -17,30 +17,18 @@
 
 package org.apache.solr.schema;
 
-import java.io.IOException;
 import java.lang.invoke.MethodHandles;
-import java.util.Map;
 
 import org.apache.lucene.document.IntPoint;
 import org.apache.lucene.document.StoredField;
-import org.apache.lucene.index.DocValues;
 import org.apache.lucene.index.IndexableField;
-import org.apache.lucene.index.LeafReaderContext;
-import org.apache.lucene.index.SortedDocValues;
-import org.apache.lucene.index.SortedSetDocValues;
 import org.apache.lucene.legacy.LegacyNumericType;
-import org.apache.lucene.queries.function.FunctionValues;
 import org.apache.lucene.queries.function.ValueSource;
-import org.apache.lucene.queries.function.docvalues.IntDocValues;
 import org.apache.lucene.queries.function.valuesource.IntFieldSource;
-import org.apache.lucene.queries.function.valuesource.SortedSetFieldSource;
 import org.apache.lucene.search.Query;
 import org.apache.lucene.search.SortField;
-import org.apache.lucene.search.SortedSetSelector;
 import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.BytesRefBuilder;
-import org.apache.lucene.util.mutable.MutableValue;
-import org.apache.lucene.util.mutable.MutableValueInt;
 import org.apache.solr.search.QParser;
 import org.apache.solr.uninverting.UninvertingReader.Type;
 import org.slf4j.Logger;
@@ -104,74 +92,6 @@ public class IntPointField extends PointField implements IntValueFieldType {
   }
 
   @Override
-  protected ValueSource getSingleValueSource(SortedSetSelector.Type choice, SchemaField f) {
-    return new SortedSetFieldSource(f.getName(), choice) {
-      @Override
-      public FunctionValues getValues(Map context, LeafReaderContext readerContext) throws IOException {
-        SortedSetFieldSource thisAsSortedSetFieldSource = this; // needed for nested anon class ref
-
-        SortedSetDocValues sortedSet = DocValues.getSortedSet(readerContext.reader(), field);
-        SortedDocValues view = SortedSetSelector.wrap(sortedSet, selector);
-
-        return new IntDocValues(thisAsSortedSetFieldSource) {
-          private int lastDocID;
-
-          private boolean setDoc(int docID) throws IOException {
-            if (docID < lastDocID) {
-              throw new IllegalArgumentException("docs out of order: lastDocID=" + lastDocID + " docID=" + docID);
-            }
-            if (docID > view.docID()) {
-              return docID == view.advance(docID);
-            } else {
-              return docID == view.docID();
-            }
-          }
-          
-          @Override
-          public int intVal(int doc) throws IOException {
-            if (setDoc(doc)) {
-              BytesRef bytes = view.binaryValue();
-              assert bytes.length > 0;
-              return IntPoint.decodeDimension(bytes.bytes, bytes.offset);
-            } else {
-              return 0;
-            }
-          }
-
-          @Override
-          public boolean exists(int doc) throws IOException {
-            return setDoc(doc);
-          }
-
-          @Override
-          public ValueFiller getValueFiller() {
-            return new ValueFiller() {
-              private final MutableValueInt mval = new MutableValueInt();
-              
-              @Override
-              public MutableValue getValue() {
-                return mval;
-              }
-              
-              @Override
-              public void fillValue(int doc) throws IOException {
-                if (setDoc(doc)) {
-                  BytesRef bytes = view.binaryValue();
-                  mval.exists = true;
-                  mval.value = IntPoint.decodeDimension(bytes.bytes, bytes.offset);
-                } else {
-                  mval.exists = false;
-                  mval.value = 0;
-                }
-              }
-            };
-          }
-        };
-      }
-    };
-  }
-
-  @Override
   public Object toObject(SchemaField sf, BytesRef term) {
     return IntPoint.decodeDimension(term.bytes, term.offset);
   }
@@ -223,7 +143,8 @@ public class IntPointField extends PointField implements IntValueFieldType {
   @Override
   public Type getUninversionType(SchemaField sf) {
     if (sf.multiValued()) {
-      return Type.SORTED_SET_INTEGER;
+      throw new UnsupportedOperationException("MultiValued Point fields with DocValues is not currently supported");
+//      return Type.SORTED_INTEGER;
     } else {
       return Type.INTEGER_POINT;
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ebcfc231/solr/core/src/java/org/apache/solr/schema/PointField.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/schema/PointField.java b/solr/core/src/java/org/apache/solr/schema/PointField.java
index 5e70159..8480439 100644
--- a/solr/core/src/java/org/apache/solr/schema/PointField.java
+++ b/solr/core/src/java/org/apache/solr/schema/PointField.java
@@ -23,7 +23,6 @@ import java.util.Collections;
 import java.util.List;
 
 import org.apache.lucene.document.NumericDocValuesField;
-import org.apache.lucene.document.SortedSetDocValuesField;
 import org.apache.lucene.document.StoredField;
 import org.apache.lucene.index.IndexableField;
 import org.apache.lucene.queries.function.ValueSource;
@@ -105,10 +104,12 @@ public abstract class PointField extends PrimitiveFieldType {
    * field is not supported for this field type
    *
    * @param choice the selector Type to use, will never be null
-   * @param field the field to use, garunteed to be multivalued.
+   * @param field the field to use, guaranteed to be multivalued.
    * @see #getSingleValueSource(MultiValueSelector,SchemaField,QParser) 
    */
-  protected abstract ValueSource getSingleValueSource(SortedSetSelector.Type choice, SchemaField field);
+  protected ValueSource getSingleValueSource(SortedSetSelector.Type choice, SchemaField field) {
+    throw new UnsupportedOperationException("MultiValued Point fields with DocValues is not currently supported");
+  }
 
   @Override
   public boolean isTokenized() {
@@ -126,23 +127,6 @@ public abstract class PointField extends PrimitiveFieldType {
   public PointTypes getType() {
     return type;
   }
-
-//  @Override
-//  public FieldType.LegacyNumericType getNumericType() {
-//    switch (type) {
-//      case INTEGER:
-//        return FieldType.LegacyNumericType.INT;
-//      case LONG:
-//      case DATE:
-//        return FieldType.LegacyNumericType.LONG;
-//      case FLOAT:
-//        return FieldType.LegacyNumericType.FLOAT;
-//      case DOUBLE:
-//        return FieldType.LegacyNumericType.DOUBLE;
-//      default:
-//        throw new AssertionError();
-//    }
-//  }
   
   @Override
   public Query getFieldQuery(QParser parser, SchemaField field, String externalVal) {
@@ -227,7 +211,7 @@ public abstract class PointField extends PrimitiveFieldType {
     
     if (sf.hasDocValues()) {
       if (sf.multiValued()) {
-        fields.add(new SortedSetDocValuesField(sf.getName(), storedToIndexedByteRef(field)));
+        throw new UnsupportedOperationException("MultiValued Point fields with DocValues is not currently supported. Field: '" + sf.getName() + "'");
       } else {
         final long bits;
         if (field.numericValue() instanceof Integer || field.numericValue() instanceof Long) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ebcfc231/solr/core/src/test-files/solr/collection1/conf/schema.xml
----------------------------------------------------------------------
diff --git a/solr/core/src/test-files/solr/collection1/conf/schema.xml b/solr/core/src/test-files/solr/collection1/conf/schema.xml
index 270f1fd..7bb8893 100644
--- a/solr/core/src/test-files/solr/collection1/conf/schema.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/schema.xml
@@ -675,10 +675,10 @@
   <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="*_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="${solr.tests.doubleClass:pdouble}" 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"/>
 
@@ -689,7 +689,7 @@
                 useDocValuesAsStored="true"/>
   <dynamicField name="*_s_dvo" multiValued="false" type="string" docValues="true" indexed="true" stored="false"
                 useDocValuesAsStored="true"/>
-  <dynamicField name="*_ii_dvo" multiValued="true" type="${solr.tests.intClass:pint}" docValues="true" indexed="true" stored="false"
+  <dynamicField name="*_ii_dvo" multiValued="true" type="int" docValues="true" indexed="true" stored="false"
                 useDocValuesAsStored="true"/>
   <dynamicField name="*_dd_dvo" multiValued="true" type="double" docValues="true" indexed="true" stored="false"
                 useDocValuesAsStored="true"/>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ebcfc231/solr/core/src/test-files/solr/collection1/conf/schema11.xml
----------------------------------------------------------------------
diff --git a/solr/core/src/test-files/solr/collection1/conf/schema11.xml b/solr/core/src/test-files/solr/collection1/conf/schema11.xml
index ecaebf2..ae2a2c6 100644
--- a/solr/core/src/test-files/solr/collection1/conf/schema11.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/schema11.xml
@@ -325,7 +325,7 @@ valued. -->
 
    <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_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"/>
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ebcfc231/solr/core/src/test-files/solr/collection1/conf/schema_latest.xml
----------------------------------------------------------------------
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.xml
index 6c38ffb..40cec58 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
@@ -203,7 +203,7 @@
   <dynamicField name="*_i" type="int" indexed="true" stored="true"/>
   <dynamicField name="*_is" type="int" 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="*_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"/>
@@ -220,7 +220,7 @@
   <dynamicField name="*_d" type="double" indexed="true" stored="true"/>
   <dynamicField name="*_ds" type="double" 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="*_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"/>
@@ -228,7 +228,7 @@
 
   <!-- 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="*_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="long" indexed="true" stored="true" docValues="true"/>
@@ -236,7 +236,7 @@
   <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="${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="*_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"/>
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ebcfc231/solr/core/src/test/org/apache/solr/TestPointFields.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/TestPointFields.java b/solr/core/src/test/org/apache/solr/TestPointFields.java
index 7b65288..f8eb947 100644
--- a/solr/core/src/test/org/apache/solr/TestPointFields.java
+++ b/solr/core/src/test/org/apache/solr/TestPointFields.java
@@ -29,6 +29,7 @@ import org.apache.solr.schema.PointField;
 import org.apache.solr.schema.SchemaField;
 import org.junit.After;
 import org.junit.BeforeClass;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -62,7 +63,7 @@ public class TestPointFields extends SolrTestCaseJ4 {
     doTestIntPointFieldExactQuery("number_p_i");
     doTestIntPointFieldExactQuery("number_p_i_mv");
     doTestIntPointFieldExactQuery("number_p_i_ni_dv");
-    doTestIntPointFieldExactQuery("number_p_i_ni_mv_dv");
+//    doTestIntPointFieldExactQuery("number_p_i_ni_mv_dv");
     
   }
   
@@ -338,12 +339,12 @@ public class TestPointFields extends SolrTestCaseJ4 {
   
   @Test
   public void testIntPointGrouping() throws Exception {
-    
+    // nocommit: Implement or remove
   }
   
   @Test
   public void testIntPointPivotFaceting() throws Exception {
-    
+    // nocommit: Implement or remove
   }
   
   private void testPointFieldMultiValuedExactQuery(String fieldName, String[] numbers) throws Exception {
@@ -500,12 +501,14 @@ public class TestPointFields extends SolrTestCaseJ4 {
   
 
   @Test
+  @Ignore
   public void testIntPointFieldMultiValuedFacetField() throws Exception {
     testPointFieldMultiValuedFacetField("number_p_i_mv", "number_p_i_mv_dv", getSequentialStringArrayWithInts(20));
   }
   
 
   @Test
+  @Ignore
   public void testIntPointFieldMultiValuedRangeFacet() throws Exception {
     String docValuesField = "number_p_i_mv_dv";
     String nonDocValuesField = "number_p_i_mv";
@@ -648,6 +651,7 @@ public class TestPointFields extends SolrTestCaseJ4 {
 //  }
   
   @Test
+  @Ignore
   public void testIntPointMultiValuedFunctionQuery() throws Exception {
     testPointMultiValuedFunctionQuery("number_p_i_mv", "number_p_i_mv_dv", "int", getSequentialStringArrayWithInts(20));
   }
@@ -692,7 +696,7 @@ public class TestPointFields extends SolrTestCaseJ4 {
     doTestFloatPointFieldExactQuery("number_p_d");
     doTestFloatPointFieldExactQuery("number_p_d_mv");
     doTestFloatPointFieldExactQuery("number_p_d_ni_dv");
-    doTestFloatPointFieldExactQuery("number_p_d_ni_mv_dv");
+//    doTestFloatPointFieldExactQuery("number_p_d_ni_mv_dv");
   }
   
   private void doTestFloatPointFieldExactQuery(String field) throws Exception {
@@ -845,7 +849,9 @@ public class TestPointFields extends SolrTestCaseJ4 {
   
   @Test
   public void testDoublePointFieldFacetField() throws Exception {
-//    testPointFieldFacetField("number_p_d", "number_p_d_dv", getSequentialStringArrayWithDoubles(10));
+    testPointFieldFacetField("number_p_d", "number_p_d_dv", getSequentialStringArrayWithDoubles(10));
+    clearIndex();
+    assertU(commit());
     testPointFieldFacetField("number_p_d", "number_p_d_dv", getRandomStringArrayWithFloats(10, false));
   }
   
@@ -1026,13 +1032,15 @@ public class TestPointFields extends SolrTestCaseJ4 {
   }
   
   @Test
+  @Ignore
   public void testDoublePointFieldMultiValuedFacetField() throws Exception {
-//    testPointFieldMultiValuedFacetField("number_p_d_mv", "number_p_d_mv_dv", getSequentialStringArrayWithDoubles(20));
+    testPointFieldMultiValuedFacetField("number_p_d_mv", "number_p_d_mv_dv", getSequentialStringArrayWithDoubles(20));
     testPointFieldMultiValuedFacetField("number_p_d_mv", "number_p_d_mv_dv", getRandomStringArrayWithFloats(20, false));
   }
   
 
   @Test
+  @Ignore
   public void testDoublePointFieldMultiValuedRangeFacet() throws Exception {
     String docValuesField = "number_p_d_mv_dv";
     String nonDocValuesField = "number_p_d_mv";
@@ -1112,8 +1120,9 @@ public class TestPointFields extends SolrTestCaseJ4 {
   }
   
   @Test
+  @Ignore
   public void testDoublePointMultiValuedFunctionQuery() throws Exception {
-//    testPointMultiValuedFunctionQuery("number_p_d_mv", "number_p_d_mv_dv", "double", getSequentialStringArrayWithDoubles(20));
+    testPointMultiValuedFunctionQuery("number_p_d_mv", "number_p_d_mv_dv", "double", getSequentialStringArrayWithDoubles(20));
     testPointMultiValuedFunctionQuery("number_p_d_mv", "number_p_d_mv_dv", "double", getRandomStringArrayWithFloats(20, true));
   }
   

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ebcfc231/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
----------------------------------------------------------------------
diff --git a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
index dd986fc..5f25e3a 100644
--- a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
+++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
@@ -159,6 +159,13 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase {
   public static final String SYSTEM_PROPERTY_SOLR_TESTS_USEMERGEPOLICYFACTORY = "solr.tests.useMergePolicyFactory";
   @Deprecated // remove solr.tests.useMergePolicy use with SOLR-8668
   public static final String SYSTEM_PROPERTY_SOLR_TESTS_USEMERGEPOLICY = "solr.tests.useMergePolicy";
+  
+  /**
+   * 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;
 
@@ -445,11 +452,13 @@ 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) || random().nextBoolean()) {
+    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.doubleClass", "double");
     } else {
-      log.info("Using PointFields"); //nocommit remove log
+      log.info("Using PointFields");
       System.setProperty("solr.tests.intClass", "pint");
       System.setProperty("solr.tests.doubleClass", "pdouble");
     }