public class TaxonomyFacetLabels.FacetLabelReader extends Object
| Constructor and Description |
|---|
FacetLabelReader(OrdinalsReader ordsReader,
LeafReaderContext readerContext)
Sole constructor.
|
| Modifier and Type | Method and Description |
|---|---|
FacetLabel |
nextFacetLabel(int docId)
|
FacetLabel |
nextFacetLabel(int docId,
String facetDimension)
Retrieves the next
FacetLabel for the specified docId under the requested facetDimension,
or null if there are no more. |
public FacetLabelReader(OrdinalsReader ordsReader, LeafReaderContext readerContext) throws IOException
IOExceptionpublic FacetLabel nextFacetLabel(int docId) throws IOException
FacetLabel for the specified docId, or null if there are no more.
This method has state: if the provided docId is the same as the previous invocation, it returns the
next FacetLabel for that document. Otherwise, it advances to the new docId and provides the
first FacetLabel for that document, or null if that document has no indexed facets. Each
new docId must be in strictly monotonic (increasing) order.
NOTE: The returned FacetLabels may not be in the same order in which they were indexed
docId - input docId provided in monotonic (non-decreasing) orderFacetLabel, or null if there are no moreIOException - when a low-level IO issue occursIllegalArgumentException - if docId provided is less than docId supplied in an earlier invocationpublic FacetLabel nextFacetLabel(int docId, String facetDimension) throws IOException
FacetLabel for the specified docId under the requested facetDimension,
or null if there are no more. This method has state: if the provided docId is the same as the
previous invocation, it returns the next FacetLabel for that document. Otherwise, it advances to
the new docId and provides the first FacetLabel for that document, or null if that document
has no indexed facets. Each new docId must be in strictly monotonic (increasing) order.
NOTE: This method loads the int[] parents array from the taxonomy index.
The returned FacetLabels may not be in the same order in which they were indexed.
docId - input docId provided in non-decreasing orderFacetLabel, or null if there are no moreIOException - if TaxonomyReader has problems getting path for an ordinalIllegalArgumentException - if docId provided is less than docId supplied in an earlier invocationIllegalArgumentException - if facetDimension is nullCopyright © 2000-2024 Apache Software Foundation. All Rights Reserved.