Module org.elasticsearch.server
Class SortedNumericDoubleValues
java.lang.Object
org.elasticsearch.index.fielddata.SortedNumericDoubleValues
- Direct Known Subclasses:
DoubleScriptDocValues,SortingNumericDoubleValues
Clone of
SortedNumericDocValues for double values.-
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 doubleIterates to the next value in the current document.static SortedNumericDoubleValuessingleton(org.apache.lucene.search.DoubleValues values) Converts aDoubleValuesto aSortedNumericDoubleValuesstatic org.apache.lucene.search.DoubleValuesConverts aSortedNumericDoubleValuesvalues to a singly valuedDoubleValuesif possiblestatic SortedNumericDoubleValueswrap(org.apache.lucene.index.SortedNumericDocValues values) Converts aSortedNumericDocValuesiterator to aSortedNumericDoubleValuesNote that if the wrapped iterator can be unwrapped to a singletonNumericDocValuesinstance, then the returnedSortedNumericDoubleValuescan also be unwrapped to aDoubleValuesinstance viaunwrapSingleton(SortedNumericDoubleValues)
-
Constructor Details
-
SortedNumericDoubleValues
protected SortedNumericDoubleValues()Sole constructor. (For invocation by subclass constructors, typically implicit.)
-
-
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
public static org.apache.lucene.search.DoubleValues unwrapSingleton(SortedNumericDoubleValues values) Converts aSortedNumericDoubleValuesvalues to a singly valuedDoubleValuesif possible -
singleton
Converts aDoubleValuesto aSortedNumericDoubleValues -
wrap
Converts aSortedNumericDocValuesiterator to aSortedNumericDoubleValuesNote that if the wrapped iterator can be unwrapped to a singletonNumericDocValuesinstance, then the returnedSortedNumericDoubleValuescan also be unwrapped to aDoubleValuesinstance viaunwrapSingleton(SortedNumericDoubleValues)
-