- 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>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic org.apache.lucene.search.LongValuesALongValuesinstance that does not have a value for any document -
Method Summary
Modifier and TypeMethodDescriptionstatic SortedNumericDoubleValuescastToDouble(SortedNumericLongValues values) Wrap the providedSortedNumericDocValuesinstance to cast all values to doubles.static SortedNumericLongValuescastToLong(SortedNumericDoubleValues values) Wrap the providedSortedNumericDoubleValuesinstance to cast all values to longs.static DocValueBitsdocsWithValue(org.apache.lucene.index.SortedSetDocValues docValues) Returns aDocValueBitsrepresenting all documents fromdocValuesthat have a value.static DocValueBitsdocsWithValue(MultiPointValues<? extends SpatialPoint> 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 DocValueBitsdocsWithValue(SortedNumericLongValues docValues) Returns aDocValueBitsrepresenting all documents fromdocValuesthat have a value.static SortedBinaryDocValuesReturn aSortedBinaryDocValuesthat doesn't contain any value.static SortedNumericDoubleValuesReturn aSortedNumericDoubleValuesthat doesn't contain any value.static DenseDoubleValuesreplaceMissing(org.apache.lucene.search.DoubleValues values, double missing) Return aDoubleValuesinstance that has a value for every document, returns the same value asvaluesif there is a value for the current document andmissingotherwise.static DenseLongValuesreplaceMissing(org.apache.lucene.search.LongValues 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 SortedBinaryDocValuessingleton(org.apache.lucene.index.BinaryDocValues values) Returns a multi-valued view over the providedBinaryDocValues.static SortedNumericDoubleValuessingleton(org.apache.lucene.search.DoubleValues values) Returns a multi-valued view over the providedDoubleValues.static SortedNumericDoubleValuesGiven aSortedNumericLongValues, return aSortedNumericDoubleValuesinstance that will translate long values to doubles usingNumericUtils.sortableLongToDouble(long).static SortedNumericLongValuesGiven aSortedNumericDoubleValues, return aSortedNumericDocValuesinstance that will translate double values to sortable long bits usingNumericUtils.doubleToSortableLong(double).static org.apache.lucene.index.BinaryDocValuestoString(org.apache.lucene.index.SortedDocValues values) Return aStringrepresentation of the provided values.static SortedBinaryDocValuestoString(org.apache.lucene.index.SortedSetDocValues values) Return aStringrepresentation of the provided values.static org.apache.lucene.index.BinaryDocValuestoString(org.apache.lucene.search.DoubleValues values) Return aStringrepresentation of the provided values.static org.apache.lucene.index.BinaryDocValuestoString(org.apache.lucene.search.LongValues values) Return aStringrepresentation of the provided values.static org.apache.lucene.index.BinaryDocValuestoString(GeoPointValues 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 SortedBinaryDocValuestoString(SortedNumericLongValues values) Return aStringrepresentation of the provided values.static GeoPointValuesunwrapSingleton(MultiGeoPointValues values) Returns a single-valued view of theMultiGeoPointValues, if the wrappedSortedNumericDocValuesis a singleton.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 org.apache.lucene.search.DoubleValuesReturns 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.
-
Field Details
-
EMPTY
public static org.apache.lucene.search.LongValues EMPTYALongValuesinstance that does not have a value for any document
-
-
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. -
emptySortedNumericDoubles
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
Given aSortedNumericDoubleValues, return aSortedNumericDocValuesinstance that will translate double values to sortable long bits usingNumericUtils.doubleToSortableLong(double). -
sortableLongBitsToDoubles
Given aSortedNumericLongValues, return aSortedNumericDoubleValuesinstance that will translate long values to doubles usingNumericUtils.sortableLongToDouble(long). -
castToDouble
Wrap the providedSortedNumericDocValuesinstance to cast all values to doubles. -
castToLong
Wrap the providedSortedNumericDoubleValuesinstance to cast all values to longs. -
singleton
Returns a multi-valued view over the providedDoubleValues. -
unwrapSingleton
public static org.apache.lucene.search.DoubleValues unwrapSingleton(SortedNumericDoubleValues values) Returns a single-valued view of theSortedNumericDoubleValues, if it was previously wrapped withDocValues.singleton(NumericDocValues), or null. -
unwrapSingleton
Returns a single-valued view of theMultiGeoPointValues, if the wrappedSortedNumericDocValuesis a singleton. -
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. -
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
public static org.apache.lucene.index.BinaryDocValues toString(org.apache.lucene.search.LongValues values) 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
public static org.apache.lucene.index.BinaryDocValues toString(org.apache.lucene.search.DoubleValues values) 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
public static org.apache.lucene.index.BinaryDocValues toString(org.apache.lucene.index.SortedDocValues values) 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! -
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 DenseLongValues replaceMissing(org.apache.lucene.search.LongValues 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
public static DenseDoubleValues replaceMissing(org.apache.lucene.search.DoubleValues values, double missing) Return aDoubleValuesinstance that has a value for every document, returns the same value asvaluesif there is a value for the current document andmissingotherwise.
-