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 SortedNumericDoubleValues
castToDouble(org.apache.lucene.index.SortedNumericDocValues values)
Wrap the providedSortedNumericDocValues
instance to cast all values to doubles.static org.apache.lucene.index.SortedNumericDocValues
castToLong(SortedNumericDoubleValues values)
Wrap the providedSortedNumericDoubleValues
instance to cast all values to longs.static DocValueBits
docsWithValue(org.apache.lucene.index.SortedNumericDocValues docValues)
Returns aDocValueBits
representing all documents fromdocValues
that have a value.static DocValueBits
docsWithValue(org.apache.lucene.index.SortedSetDocValues docValues)
Returns aDocValueBits
representing all documents fromdocValues
that have a value.static DocValueBits
docsWithValue(MultiGeoPointValues pointValues)
Returns aDocValueBits
representing all documents frompointValues
that have a value.static DocValueBits
docsWithValue(SortedBinaryDocValues values)
Returns aDocValueBits
representing all documents fromvalues
that have a value.static DocValueBits
docsWithValue(SortedNumericDoubleValues doubleValues)
Returns aDocValueBits
representing all documents fromdoubleValues
that have a value.static GeoPointValues
static MultiGeoPointValues
Return aSortedNumericDoubleValues
that doesn't contain any value.static NumericDoubleValues
Return aNumericDoubleValues
that doesn't contain any value.static SortedBinaryDocValues
Return aSortedBinaryDocValues
that doesn't contain any value.static SortedNumericDoubleValues
Return aSortedNumericDoubleValues
that doesn't contain any value.static boolean
isMultiValued(org.apache.lucene.index.SortedSetDocValues values)
Returns whether the provided values *might* be multi-valued.static org.apache.lucene.index.NumericDocValues
replaceMissing(org.apache.lucene.index.NumericDocValues values, long missing)
Return aNumericDocValues
instance that has a value for every document, returns the same value asvalues
if there is a value for the current document andmissing
otherwise.static NumericDoubleValues
replaceMissing(NumericDoubleValues values, double missing)
Return aNumericDoubleValues
instance that has a value for every document, returns the same value asvalues
if there is a value for the current document andmissing
otherwise.static SortedBinaryDocValues
singleton(org.apache.lucene.index.BinaryDocValues values)
Returns a multi-valued view over the providedBinaryDocValues
.static MultiGeoPointValues
singleton(GeoPointValues values)
Returns a multi-valued view over the providedGeoPointValues
.static SortedNumericDoubleValues
singleton(NumericDoubleValues values)
Returns a multi-valued view over the providedNumericDoubleValues
.static SortedNumericDoubleValues
sortableLongBitsToDoubles(org.apache.lucene.index.SortedNumericDocValues values)
Given aSortedNumericDocValues
, return aSortedNumericDoubleValues
instance that will translate long values to doubles usingNumericUtils.sortableLongToDouble(long)
.static org.apache.lucene.index.SortedNumericDocValues
Given aSortedNumericDoubleValues
, return aSortedNumericDocValues
instance that will translate double values to sortable long bits usingNumericUtils.doubleToSortableLong(double)
.static SortedBinaryDocValues
toString(org.apache.lucene.index.SortedNumericDocValues values)
Return aString
representation of the provided values.static SortedBinaryDocValues
toString(org.apache.lucene.index.SortedSetDocValues values)
Return aString
representation of the provided values.static SortedBinaryDocValues
toString(MultiGeoPointValues values)
Return aString
representation of the provided values.static SortedBinaryDocValues
toString(SortedNumericDoubleValues values)
Return aString
representation of the provided values.static GeoPointValues
unwrapSingleton(MultiGeoPointValues values)
Returns a single-valued view of theMultiGeoPointValues
, if it was previously wrapped withsingleton(GeoPointValues)
, or null.static org.apache.lucene.index.BinaryDocValues
unwrapSingleton(SortedBinaryDocValues values)
Returns a single-valued view of theSortedBinaryDocValues
, if it was previously wrapped withsingleton(BinaryDocValues)
, or null.static NumericDoubleValues
Returns a single-valued view of theSortedNumericDoubleValues
, if it was previously wrapped withDocValues.singleton(NumericDocValues)
, or null.static FieldData
Returns 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 aSortedBinaryDocValues
that doesn't contain any value. -
emptyNumericDouble
Return aNumericDoubleValues
that doesn't contain any value. -
emptySortedNumericDoubles
Return aSortedNumericDoubleValues
that doesn't contain any value. -
emptyGeoPoint
-
emptyMultiGeoPoints
Return aSortedNumericDoubleValues
that doesn't contain any value. -
docsWithValue
Returns aDocValueBits
representing all documents fromvalues
that have a value. -
docsWithValue
Returns aDocValueBits
representing all documents fromdocValues
that have a value. -
docsWithValue
Returns aDocValueBits
representing all documents frompointValues
that have a value. -
docsWithValue
Returns aDocValueBits
representing all documents fromdoubleValues
that have a value. -
docsWithValue
Returns aDocValueBits
representing all documents fromdocValues
that have a value. -
toSortableLongBits
public static org.apache.lucene.index.SortedNumericDocValues toSortableLongBits(SortedNumericDoubleValues values)Given aSortedNumericDoubleValues
, return aSortedNumericDocValues
instance 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 aSortedNumericDoubleValues
instance that will translate long values to doubles usingNumericUtils.sortableLongToDouble(long)
. -
castToDouble
public static SortedNumericDoubleValues castToDouble(org.apache.lucene.index.SortedNumericDocValues values)Wrap the providedSortedNumericDocValues
instance to cast all values to doubles. -
castToLong
public static org.apache.lucene.index.SortedNumericDocValues castToLong(SortedNumericDoubleValues values)Wrap the providedSortedNumericDoubleValues
instance 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 returnfalse
in the single-valued case. -
toString
Return aString
representation 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 aString
representation 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 aString
representation 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 aString
representation 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 aNumericDocValues
instance that has a value for every document, returns the same value asvalues
if there is a value for the current document andmissing
otherwise. -
replaceMissing
Return aNumericDoubleValues
instance that has a value for every document, returns the same value asvalues
if there is a value for the current document andmissing
otherwise.
-