Module org.elasticsearch.server
Class SortedNumericLongValues
java.lang.Object
org.elasticsearch.index.fielddata.SortedNumericLongValues
- Direct Known Subclasses:
BooleanScriptDocValues,GeoPointScriptDocValues,LongScriptDocValues,SortingNumericLongValues,SourceValueFetcherSortedNumericIndexFieldData.SourceValueFetcherSortedNumericDocValues
A multivalued version of
LongValues-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic SortedNumericLongValuesASortedNumericLongValuesinstance that does not have a value for any document -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanadvanceExact(int target) Advance the iterator to exactlytargetand return whethertargethas a value.abstract intRetrieves the number of values for the current document.abstract longIterates to the next value in the current document.static SortedNumericLongValuessingleton(org.apache.lucene.search.LongValues values) Converts aLongValuesto aSortedNumericLongValuesstatic org.apache.lucene.search.LongValuesConverts aSortedNumericLongValuesvalues to a singly valuedLongValuesif possiblestatic SortedNumericLongValueswrap(org.apache.lucene.index.SortedNumericDocValues values) Converts aSortedNumericDocValuesiterator to aSortedNumericLongValuesNote that if the wrapped iterator can be unwrapped to a singletonNumericDocValuesinstance, then the returnedSortedNumericLongValuescan also be unwrapped to aLongValuesinstance viaunwrapSingleton(SortedNumericLongValues)
-
Field Details
-
EMPTY
ASortedNumericLongValuesinstance that does not have a value for any document
-
-
Constructor Details
-
SortedNumericLongValues
public SortedNumericLongValues()
-
-
Method Details
-
advanceExact
Advance the iterator to exactlytargetand return whethertargethas a value.targetmust be greater than or equal to the current doc ID and must be a valid doc ID, ie. ≥ 0 and <maxDoc.- Throws:
IOException
-
nextValue
Iterates to the next value in the current document. Do not call this more thandocValueCount()times for the document.- Throws:
IOException
-
docValueCount
public abstract int docValueCount()Retrieves the number of values for the current document. This must always be greater than zero. It is illegal to call this method afteradvanceExact(int)returnedfalse. -
unwrapSingleton
Converts aSortedNumericLongValuesvalues to a singly valuedLongValuesif possible -
singleton
Converts aLongValuesto aSortedNumericLongValues -
wrap
Converts aSortedNumericDocValuesiterator to aSortedNumericLongValuesNote that if the wrapped iterator can be unwrapped to a singletonNumericDocValuesinstance, then the returnedSortedNumericLongValuescan also be unwrapped to aLongValuesinstance viaunwrapSingleton(SortedNumericLongValues)
-