static {
   // Default: pointValues + docValues
   FieldType type = new FieldType();
   type.setDimensions(1, Double.BYTES); // pointValues (assume Double)
   type.setDocValuesType(DocValuesType.NUMERIC); // docValues
   type.setStored(false);
   type.freeze();
   DEFAULT_FIELDTYPE = type;
   // Legacy default: legacyNumerics
   type = new FieldType();
   type.setIndexOptions(IndexOptions.DOCS);
   type.setNumericType(FieldType.LegacyNumericType.DOUBLE);
   type.setNumericPrecisionStep(8); // same as solr default
   type.setDocValuesType(DocValuesType.NONE); // no docValues!
   type.setStored(false);
   type.freeze();
   LEGACY_FIELDTYPE = type;
 }
Exemple #2
0
 private static FieldType getType(int numDims, int bytesPerDim) {
   FieldType type = new FieldType();
   type.setDimensions(numDims, bytesPerDim);
   type.freeze();
   return type;
 }