Package org.apache.lucene.facet.taxonomy
Taxonomy of Categories.
Facets are defined using a hierarchy of categories, known as a Taxonomy. For example, the taxonomy of a book store application might have the following structure:
- Author
- Mark Twain
- J. K. Rowling
- Date
- 2010
- March
- April
- 2009
The Taxonomy translates category-paths into integer identifiers (often termed
ordinals) and vice versa. The category Author/Mark Twain
adds two nodes to
the taxonomy: Author
and Author/Mark Twain
, each is assigned a
different ordinal. The taxonomy maintains the invariant that a node always has an ordinal that is
< all its children.
-
Interface Summary Interface Description TaxonomyWriter TaxonomyWriter is the interface which the faceted-search library uses to dynamically build the taxonomy at indexing time. -
Class Summary Class Description AssociationAggregationFunction Specify aggregation logic used inTaxonomyFacetIntAssociations
andTaxonomyFacetFloatAssociations
.AssociationFacetField Add an instance of this to yourDocument
to add a facet label associated with an arbitrary byte[].BackCompatSortedNumericDocValues Deprecated. Only here for back-compat support.CachedOrdinalsReader Deprecated. Custom binary encodings for taxonomy ordinals are no longer supported starting with Lucene 9CachedOrdinalsReader.CachedOrds Holds the cached ordinals in two parallelint[]
arrays.DocValuesOrdinalsReader Deprecated. Custom binary encodings for taxonomy ordinals are no longer supported starting with Lucene 9FacetLabel Holds a sequence of string components, specifying the hierarchical name of a category.FastTaxonomyFacetCounts Computes facets counts, assuming the default encoding into DocValues was used.FloatAssociationFacetField Add an instance of this to yourDocument
to add a facet label associated with a float.FloatTaxonomyFacets Deprecated. Visibility of this class will be reduced to pkg-private in a future version.IntAssociationFacetField Add an instance of this to yourDocument
to add a facet label associated with an int.IntTaxonomyFacets Deprecated. Visibility of this class will be reduced to pkg-private in a future version.LRUHashMap<K,V> LRUHashMap is an extension of Java's HashMap, which has a bounded size(); When it reaches that size, each time a new element is added, the least recently used (LRU) entry is removed.OrdinalMappingLeafReader AFilterLeafReader
for updating facets ordinal references, based on an ordinal map.OrdinalsReader Deprecated. Custom binary encodings for taxonomy ordinals are no longer supported starting with Lucene 9OrdinalsReader.OrdinalsSegmentReader Returns ordinals for documents in one segment.ParallelTaxonomyArrays Returns 3 arrays for traversing the taxonomy:parents
:parents[i]
denotes the parent of category ordinali
.PrintTaxonomyStats Prints how many ords are under each dimension.SearcherTaxonomyManager Manages near-real-time reopen of both an IndexSearcher and a TaxonomyReader.SearcherTaxonomyManager.SearcherAndTaxonomy Holds a matched pair ofIndexSearcher
andTaxonomyReader
TaxonomyFacetCounts Deprecated. Custom binary encodings for taxonomy ordinals are no longer supported starting with Lucene 9.TaxonomyFacetFloatAssociations Aggregates float values associated with facet fields.TaxonomyFacetIntAssociations Aggregates int values previously indexed withIntAssociationFacetField
, assuming the default encoding.TaxonomyFacetLabels Utility class to easily retrieve previously indexed facet labels, allowing you to skip also adding stored fields for these values, reducing your index size.TaxonomyFacets Deprecated. Visibility of this class will be reduced to pkg-private in a future version.TaxonomyFacetSumFloatAssociations Deprecated. This class is being deprecated in favor ofTaxonomyFacetFloatAssociations
, which provides more flexible aggregation functionality beyond just "sum"TaxonomyFacetSumIntAssociations Deprecated. This class is being deprecated in favor ofTaxonomyFacetIntAssociations
, which provides more flexible aggregation functionality beyond just "sum"TaxonomyFacetSumValueSource Deprecated. This class is being deprecated in favor ofTaxonomyFacetFloatAssociations
, which provides more flexible aggregation functionality beyond just "sum"TaxonomyMergeUtils Utility methods for merging index and taxonomy directories.TaxonomyReader TaxonomyReader is the read-only interface with which the faceted-search library uses the taxonomy during search time.TaxonomyReader.ChildrenIterator An iterator over a category's children.