Package org.opensearch.index.fielddata
Enum FieldData
- All Implemented Interfaces:
Serializable
,Comparable<FieldData>
Utility methods, similar to Lucene's
DocValues
.- Opensearch.internal:
-
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
(GeoShapeValue shapeValues) Returns aDocValueBits
representing all documents fromshapeValues
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 GeoShapeValue
Return aGeoShapeValue
that doesn't contain any value.static MultiGeoPointValues
Return aMultiGeoPointValues
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 org.apache.lucene.index.NumericDocValues
replaceMissing
(org.apache.lucene.index.NumericDocValues values, BigInteger 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
(GeoShapeValue geoShapeValue) 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 SortedBinaryDocValues
toUnsignedString
(org.apache.lucene.index.SortedNumericDocValues values) Return aString
representation of the provided values treating them as unsigned.static SortedNumericDoubleValues
unsignedLongToDoubles
(org.apache.lucene.index.SortedNumericDocValues values) Given aSortedNumericDocValues
, return aSortedNumericDoubleValues
instance that will translate unsigned long values to doubles usingNumbers.toUnsignedBigInteger(long)
.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 type with the specified name.static FieldData[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type 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 aMultiGeoPointValues
that doesn't contain any value. -
emptyGeoShape
Return aGeoShapeValue
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 fromshapeValues
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)
. -
unsignedLongToDoubles
public static SortedNumericDoubleValues unsignedLongToDoubles(org.apache.lucene.index.SortedNumericDocValues values) Given aSortedNumericDocValues
, return aSortedNumericDoubleValues
instance that will translate unsigned long values to doubles usingNumbers.toUnsignedBigInteger(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! -
toUnsignedString
public static SortedBinaryDocValues toUnsignedString(org.apache.lucene.index.SortedNumericDocValues values) Return aString
representation of the provided values treating them as unsigned. 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! -
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
public static org.apache.lucene.index.NumericDocValues replaceMissing(org.apache.lucene.index.NumericDocValues values, BigInteger 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.
-