Package org.apache.lucene.facet.taxonomy
Class TaxonomyFacetLabels
- java.lang.Object
-
- org.apache.lucene.facet.taxonomy.TaxonomyFacetLabels
-
public class TaxonomyFacetLabels extends Object
Utility class to easily retrieve previously indexed facet labels, allowing you to skip also adding stored fields for these values, reducing your index size.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
TaxonomyFacetLabels.FacetLabelReader
Utility class to retrieve facet labels for multiple documents.
-
Constructor Summary
Constructors Constructor Description TaxonomyFacetLabels(TaxonomyReader taxoReader, String indexFieldName)
Sole constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TaxonomyFacetLabels.FacetLabelReader
getFacetLabelReader(LeafReaderContext readerContext)
Create and return an instance ofTaxonomyFacetLabels.FacetLabelReader
to retrieve facet labels for multiple documents and (optionally) for a specific dimension.
-
-
-
Constructor Detail
-
TaxonomyFacetLabels
public TaxonomyFacetLabels(TaxonomyReader taxoReader, String indexFieldName)
Sole constructor. Do not close the providedTaxonomyReader
while still using this instance!
-
-
Method Detail
-
getFacetLabelReader
public TaxonomyFacetLabels.FacetLabelReader getFacetLabelReader(LeafReaderContext readerContext) throws IOException
Create and return an instance ofTaxonomyFacetLabels.FacetLabelReader
to retrieve facet labels for multiple documents and (optionally) for a specific dimension. You must create this per-segment, and then step through all hits, in order, for that segment.NOTE: This class is not thread-safe, so you must use a new instance of this class for each thread.
- Parameters:
readerContext
- LeafReaderContext used to access theBinaryDocValues
facet field- Returns:
- an instance of
TaxonomyFacetLabels.FacetLabelReader
- Throws:
IOException
- when a low-level IO issue occurs
-
-