Package org.apache.lucene.facet
Class MultiLongValues
java.lang.Object
org.apache.lucene.facet.MultiLongValues
Per-segment, per-document long values, which can be calculated at search-time. Documents may
produce multiple values. See also
LongValues
for a single-valued version.
Currently meant only for use within the faceting module. Could be further generalized and made available for more use-cases outside faceting if there is a desire to do so.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
advanceExact
(int doc) Advance to exactlytarget
and return whethertarget
has a value.abstract long
Retrieves the number of values for the current document.abstract long
Iterates to the next value in the current document.
-
Constructor Details
-
MultiLongValues
public MultiLongValues()Instantiates a new MultiLongValues
-
-
Method Details
-
getValueCount
public abstract long getValueCount()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
. -
nextValue
Iterates to the next value in the current document. Do not call this more thangetValueCount()
times for the document.- Throws:
IOException
-
advanceExact
Advance to exactlytarget
and return whethertarget
has a value.- Throws:
IOException
-