Package org.apache.lucene.index
Class SortedNumericDocValues
- java.lang.Object
-
- org.apache.lucene.search.DocIdSetIterator
-
- org.apache.lucene.index.SortedNumericDocValues
-
- Direct Known Subclasses:
FilterSortedNumericDocValues
public abstract class SortedNumericDocValues extends DocIdSetIterator
A list of per-document numeric values, sorted according toLong.compare(long, long)
.
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.search.DocIdSetIterator
NO_MORE_DOCS
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SortedNumericDocValues()
Sole constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract boolean
advanceExact(int target)
Advance the iterator to exactlytarget
and return whethertarget
has a value.abstract int
docValueCount()
Retrieves the number of values for the current document.abstract long
nextValue()
Iterates to the next value in the current document.-
Methods inherited from class org.apache.lucene.search.DocIdSetIterator
advance, all, cost, docID, empty, nextDoc, range, slowAdvance
-
-
-
-
Method Detail
-
nextValue
public abstract long nextValue() throws IOException
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
.
-
advanceExact
public abstract boolean advanceExact(int target) throws IOException
Advance the iterator to exactlytarget
and return whethertarget
has a value.target
must be greater than or equal to the currentdoc ID
and must be a valid doc ID, ie. ≥ 0 and <maxDoc
. After this method returns,DocIdSetIterator.docID()
returnstarget
.- Throws:
IOException
-
-