Enum Class FieldData
- All Implemented Interfaces:
Serializable,Comparable<FieldData>,Constable
Utility methods, similar to Lucene's
DocValues.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Method Summary
Modifier and TypeMethodDescriptionstatic SortedNumericDoubleValuescastToDouble(org.apache.lucene.index.SortedNumericDocValues values)Wrap the providedSortedNumericDocValuesinstance to cast all values to doubles.static org.apache.lucene.index.SortedNumericDocValuescastToLong(SortedNumericDoubleValues values)Wrap the providedSortedNumericDoubleValuesinstance to cast all values to longs.static DocValueBitsdocsWithValue(org.apache.lucene.index.SortedNumericDocValues docValues)Returns aDocValueBitsrepresenting all documents fromdocValuesthat have a value.static DocValueBitsdocsWithValue(org.apache.lucene.index.SortedSetDocValues docValues)Returns aDocValueBitsrepresenting all documents fromdocValuesthat have a value.static DocValueBitsdocsWithValue(MultiGeoPointValues pointValues)Returns aDocValueBitsrepresenting all documents frompointValuesthat have a value.static DocValueBitsdocsWithValue(SortedBinaryDocValues values)Returns aDocValueBitsrepresenting all documents fromvaluesthat have a value.static DocValueBitsdocsWithValue(SortedNumericDoubleValues doubleValues)Returns aDocValueBitsrepresenting all documents fromdoubleValuesthat have a value.static GeoPointValuesstatic MultiGeoPointValuesReturn aSortedNumericDoubleValuesthat doesn't contain any value.static NumericDoubleValuesReturn aNumericDoubleValuesthat doesn't contain any value.static SortedBinaryDocValuesReturn aSortedBinaryDocValuesthat doesn't contain any value.static SortedNumericDoubleValuesReturn aSortedNumericDoubleValuesthat doesn't contain any value.static booleanisMultiValued(org.apache.lucene.index.SortedSetDocValues values)Returns whether the provided values *might* be multi-valued.static org.apache.lucene.index.NumericDocValuesreplaceMissing(org.apache.lucene.index.NumericDocValues values, long missing)Return aNumericDocValuesinstance that has a value for every document, returns the same value asvaluesif there is a value for the current document andmissingotherwise.static NumericDoubleValuesreplaceMissing(NumericDoubleValues values, double missing)Return aNumericDoubleValuesinstance that has a value for every document, returns the same value asvaluesif there is a value for the current document andmissingotherwise.static SortedBinaryDocValuessingleton(org.apache.lucene.index.BinaryDocValues values)Returns a multi-valued view over the providedBinaryDocValues.static MultiGeoPointValuessingleton(GeoPointValues values)Returns a multi-valued view over the providedGeoPointValues.static SortedNumericDoubleValuessingleton(NumericDoubleValues values)Returns a multi-valued view over the providedNumericDoubleValues.static SortedNumericDoubleValuessortableLongBitsToDoubles(org.apache.lucene.index.SortedNumericDocValues values)Given aSortedNumericDocValues, return aSortedNumericDoubleValuesinstance that will translate long values to doubles usingNumericUtils.sortableLongToDouble(long).static org.apache.lucene.index.SortedNumericDocValuesGiven aSortedNumericDoubleValues, return aSortedNumericDocValuesinstance that will translate double values to sortable long bits usingNumericUtils.doubleToSortableLong(double).static SortedBinaryDocValuestoString(org.apache.lucene.index.SortedNumericDocValues values)Return aStringrepresentation of the provided values.static SortedBinaryDocValuestoString(org.apache.lucene.index.SortedSetDocValues values)Return aStringrepresentation of the provided values.static SortedBinaryDocValuestoString(MultiGeoPointValues values)Return aStringrepresentation of the provided values.static SortedBinaryDocValuestoString(SortedNumericDoubleValues values)Return aStringrepresentation of the provided values.static GeoPointValuesunwrapSingleton(MultiGeoPointValues values)Returns a single-valued view of theMultiGeoPointValues, if it was previously wrapped withsingleton(GeoPointValues), or null.static org.apache.lucene.index.BinaryDocValuesunwrapSingleton(SortedBinaryDocValues values)Returns a single-valued view of theSortedBinaryDocValues, if it was previously wrapped withsingleton(BinaryDocValues), or null.static NumericDoubleValuesReturns a single-valued view of theSortedNumericDoubleValues, if it was previously wrapped withDocValues.singleton(NumericDocValues), or null.static FieldDataReturns the enum constant of this class with the specified name.static FieldData[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
emptySortedBinary
Return aSortedBinaryDocValuesthat doesn't contain any value. -
emptyNumericDouble
Return aNumericDoubleValuesthat doesn't contain any value. -
emptySortedNumericDoubles
Return aSortedNumericDoubleValuesthat doesn't contain any value. -
emptyGeoPoint
-
emptyMultiGeoPoints
Return aSortedNumericDoubleValuesthat doesn't contain any value. -
docsWithValue
Returns aDocValueBitsrepresenting all documents fromvaluesthat have a value. -
docsWithValue
Returns aDocValueBitsrepresenting all documents fromdocValuesthat have a value. -
docsWithValue
Returns aDocValueBitsrepresenting all documents frompointValuesthat have a value. -
docsWithValue
Returns aDocValueBitsrepresenting all documents fromdoubleValuesthat have a value. -
docsWithValue
Returns aDocValueBitsrepresenting all documents fromdocValuesthat have a value. -
toSortableLongBits
public static org.apache.lucene.index.SortedNumericDocValues toSortableLongBits(SortedNumericDoubleValues values)Given aSortedNumericDoubleValues, return aSortedNumericDocValuesinstance that will translate double values to sortable long bits usingNumericUtils.doubleToSortableLong(double). -
sortableLongBitsToDoubles
public static SortedNumericDoubleValues sortableLongBitsToDoubles(org.apache.lucene.index.SortedNumericDocValues values)Given aSortedNumericDocValues, return aSortedNumericDoubleValuesinstance that will translate long values to doubles usingNumericUtils.sortableLongToDouble(long). -
castToDouble
public static SortedNumericDoubleValues castToDouble(org.apache.lucene.index.SortedNumericDocValues values)Wrap the providedSortedNumericDocValuesinstance to cast all values to doubles. -
castToLong
public static org.apache.lucene.index.SortedNumericDocValues castToLong(SortedNumericDoubleValues values)Wrap the providedSortedNumericDoubleValuesinstance to cast all values to longs. -
singleton
Returns a multi-valued view over the providedNumericDoubleValues. -
unwrapSingleton
Returns a single-valued view of theSortedNumericDoubleValues, if it was previously wrapped withDocValues.singleton(NumericDocValues), or null. -
singleton
Returns a multi-valued view over the providedGeoPointValues. -
unwrapSingleton
Returns a single-valued view of theMultiGeoPointValues, if it was previously wrapped withsingleton(GeoPointValues), or null. -
singleton
Returns a multi-valued view over the providedBinaryDocValues. -
unwrapSingleton
Returns a single-valued view of theSortedBinaryDocValues, if it was previously wrapped withsingleton(BinaryDocValues), or null. -
isMultiValued
public static boolean isMultiValued(org.apache.lucene.index.SortedSetDocValues values)Returns whether the provided values *might* be multi-valued. There is no guarantee that this method will returnfalsein the single-valued case. -
toString
Return aStringrepresentation of the provided values. That is typically used for scripts or for the `map` execution mode of terms aggs. NOTE: this is very slow! -
toString
Return aStringrepresentation of the provided values. That is typically used for scripts or for the `map` execution mode of terms aggs. NOTE: this is very slow! -
toString
Return aStringrepresentation of the provided values. That is typically used for scripts or for the `map` execution mode of terms aggs. NOTE: this is slow! -
toString
Return aStringrepresentation of the provided values. That is typically used for scripts or for the `map` execution mode of terms aggs. NOTE: this is very slow! -
replaceMissing
public static org.apache.lucene.index.NumericDocValues replaceMissing(org.apache.lucene.index.NumericDocValues values, long missing)Return aNumericDocValuesinstance that has a value for every document, returns the same value asvaluesif there is a value for the current document andmissingotherwise. -
replaceMissing
Return aNumericDoubleValuesinstance that has a value for every document, returns the same value asvaluesif there is a value for the current document andmissingotherwise.
-