Uses of Class
org.apache.lucene.facet.taxonomy.FacetLabel
Packages that use FacetLabel
Package
Description
Faceted search.
Taxonomy of Categories.
Taxonomy index implementation using on top of a Directory.
Improves indexing time by caching a map of CategoryPath to their Ordinal.
Sandbox faceting: facet cutters, see
FacetCutter
for details.Sandbox faceting: facet ordinals.
Sandbox faceting: facet labels, see
OrdToLabel
for
details.-
Uses of FacetLabel in org.apache.lucene.facet
Methods in org.apache.lucene.facet with parameters of type FacetLabelModifier and TypeMethodDescriptionprivate void
FacetsConfig.indexDrillDownTerms
(Document doc, String indexFieldName, FacetsConfig.DimConfig dimConfig, FacetLabel facetLabel) -
Uses of FacetLabel in org.apache.lucene.facet.taxonomy
Methods in org.apache.lucene.facet.taxonomy that return FacetLabelModifier and TypeMethodDescriptionTaxonomyReader.getBulkPath
(int... ordinals) Returns the path names of the list of ordinals associated with different categories.abstract FacetLabel
TaxonomyReader.getPath
(int ordinal) Returns the path name of the category with the given ordinal.TaxonomyFacetLabels.FacetLabelReader.nextFacetLabel
(int docId) TaxonomyFacetLabels.FacetLabelReader.nextFacetLabel
(int docId, String facetDimension) Retrieves the nextFacetLabel
for the specifieddocId
under the requestedfacetDimension
, ornull
if there are no more.FacetLabel.subpath
(int length) Returns a sub-path of this path up tolength
components.Methods in org.apache.lucene.facet.taxonomy with parameters of type FacetLabelModifier and TypeMethodDescriptionint
TaxonomyWriter.addCategory
(FacetLabel categoryPath) addCategory() adds a category with a given path name to the taxonomy, and returns its ordinal.int
FacetLabel.compareTo
(FacetLabel other) Compares this path with anotherFacetLabel
for lexicographic order.int[]
TaxonomyReader.getBulkOrdinals
(FacetLabel... categoryPath) Returns the ordinals of the categories given as a path.abstract int
TaxonomyReader.getOrdinal
(FacetLabel categoryPath) Returns the ordinal of the category given as a path.Constructors in org.apache.lucene.facet.taxonomy with parameters of type FacetLabel -
Uses of FacetLabel in org.apache.lucene.facet.taxonomy.directory
Fields in org.apache.lucene.facet.taxonomy.directory with type parameters of type FacetLabelModifier and TypeFieldDescriptionprivate LRUHashMap
<Integer, FacetLabel> DirectoryTaxonomyReader.categoryCache
private LRUHashMap
<FacetLabel, Integer> DirectoryTaxonomyReader.ordinalCache
private BiConsumer
<FacetLabel, Document> ReindexingEnrichedDirectoryTaxonomyWriter.ordinalDataAppender
Methods in org.apache.lucene.facet.taxonomy.directory that return FacetLabelModifier and TypeMethodDescriptionDirectoryTaxonomyReader.getBulkPath
(int... ordinals) Returns an array of FacetLabels for a given array of ordinals.DirectoryTaxonomyReader.getPath
(int ordinal) private FacetLabel[]
DirectoryTaxonomyReader.getPathFromCache
(int... ordinals) Methods in org.apache.lucene.facet.taxonomy.directory that return types with arguments of type FacetLabelModifier and TypeMethodDescriptionprivate List
<FacetLabel> ReindexingEnrichedDirectoryTaxonomyWriter.recordPathsInOrder
(Directory d) Make a list of all labels in the taxonomy.Methods in org.apache.lucene.facet.taxonomy.directory with parameters of type FacetLabelModifier and TypeMethodDescriptionint
DirectoryTaxonomyWriter.addCategory
(FacetLabel categoryPath) private int
DirectoryTaxonomyWriter.addCategoryDocument
(FacetLabel categoryPath, int parent) Note that the methods calling addCategoryDocument() are synchronized, so this method is effectively synchronized as well.private void
DirectoryTaxonomyWriter.addToCache
(FacetLabel categoryPath, int id) protected void
DirectoryTaxonomyWriter.enrichOrdinalDocument
(Document d, FacetLabel categoryPath) Child classes can implement this method to modify the document corresponding to a category path before indexing it.protected void
ReindexingEnrichedDirectoryTaxonomyWriter.enrichOrdinalDocument
(Document d, FacetLabel categoryPath) Add fields specified by theReindexingEnrichedDirectoryTaxonomyWriter.ordinalDataAppender
to the providedDocument
.protected int
DirectoryTaxonomyWriter.findCategory
(FacetLabel categoryPath) Look up the given category in the cache and/or the on-disk storage, returning the category's ordinal, or a negative number in case the category does not yet exist in the taxonomy.int[]
DirectoryTaxonomyReader.getBulkOrdinals
(FacetLabel... categoryPaths) int
DirectoryTaxonomyReader.getOrdinal
(FacetLabel cp) private int
DirectoryTaxonomyWriter.internalAddCategory
(FacetLabel cp) Add a new category into the index (and the cache), and return its new ordinal.Method parameters in org.apache.lucene.facet.taxonomy.directory with type arguments of type FacetLabelModifier and TypeMethodDescriptionvoid
ReindexingEnrichedDirectoryTaxonomyWriter.reindexWithNewOrdinalData
(BiConsumer<FacetLabel, Document> ordinalDataAppender) Delete the existing taxonomy index and recreate it using new ordinal data.Constructor parameters in org.apache.lucene.facet.taxonomy.directory with type arguments of type FacetLabelModifierConstructorDescription(package private)
DirectoryTaxonomyReader
(DirectoryReader indexReader, DirectoryTaxonomyWriter taxoWriter, LRUHashMap<FacetLabel, Integer> ordinalCache, LRUHashMap<Integer, FacetLabel> categoryCache, TaxonomyIndexArrays taxoArrays) Expert: Use this method to explicitly force theDirectoryTaxonomyReader
to use specific parent/children arrays and caches.ReindexingEnrichedDirectoryTaxonomyWriter
(Directory d, BiConsumer<FacetLabel, Document> ordinalDataAppender) Create a taxonomy writer that will allow editing the ordinal docs before indexing them. -
Uses of FacetLabel in org.apache.lucene.facet.taxonomy.writercache
Methods in org.apache.lucene.facet.taxonomy.writercache with parameters of type FacetLabelModifier and TypeMethodDescriptionabstract void
LabelToOrdinal.addLabel
(FacetLabel label, int ordinal) Adds a new label if it is not yet in the table.private boolean
UTF8TaxonomyWriterCache.assertSameOrdinal
(FacetLabel label, int id, int ord) Deprecated.int
LruTaxonomyWriterCache.get
(FacetLabel categoryPath) (package private) Integer
NameIntCacheLRU.get
(FacetLabel name) int
TaxonomyWriterCache.get
(FacetLabel categoryPath) Lookup a category in the cache, returning its ordinal, or a negative number if the category is not in the cache.int
UTF8TaxonomyWriterCache.get
(FacetLabel label) Deprecated.abstract int
LabelToOrdinal.getOrdinal
(FacetLabel label) Returns the ordinal assigned to the given label, orLabelToOrdinal.INVALID_ORDINAL
if the label cannot be found in this table.(package private) Object
NameHashIntCacheLRU.key
(FacetLabel name) (package private) Object
NameHashIntCacheLRU.key
(FacetLabel name, int prefixLen) (package private) Object
NameIntCacheLRU.key
(FacetLabel name) Subclasses can override this to provide caching by e.g.(package private) Object
NameIntCacheLRU.key
(FacetLabel name, int prefixLen) boolean
LruTaxonomyWriterCache.put
(FacetLabel categoryPath, int ordinal) (package private) boolean
NameIntCacheLRU.put
(FacetLabel name, int prefixLen, Integer val) (package private) boolean
NameIntCacheLRU.put
(FacetLabel name, Integer val) Add a new value to cache.boolean
TaxonomyWriterCache.put
(FacetLabel categoryPath, int ordinal) Add a category to the cache, with the given ordinal as the value.boolean
UTF8TaxonomyWriterCache.put
(FacetLabel label, int ord) Deprecated.private BytesRef
UTF8TaxonomyWriterCache.toBytes
(FacetLabel label) Deprecated. -
Uses of FacetLabel in org.apache.lucene.sandbox.facet.cutters
Methods in org.apache.lucene.sandbox.facet.cutters that return FacetLabel -
Uses of FacetLabel in org.apache.lucene.sandbox.facet.iterators
Constructors in org.apache.lucene.sandbox.facet.iterators with parameters of type FacetLabelModifierConstructorDescriptionCandidateSetOrdinalIterator
(FacetRecorder facetRecorder, FacetLabel[] candidateLabels, LabelToOrd labelToOrd) Constructor. -
Uses of FacetLabel in org.apache.lucene.sandbox.facet.labels
Methods in org.apache.lucene.sandbox.facet.labels that return FacetLabelModifier and TypeMethodDescriptionOrdToLabel.getLabel
(int ordinal) get label of one ord TODO: what do we return when ordinal is not valid? null?RangeOrdToLabel.getLabel
(int ordinal) TaxonomyOrdLabelBiMap.getLabel
(int ordinal) OrdToLabel.getLabels
(int[] ordinals) get labels for multiple ordsRangeOrdToLabel.getLabels
(int[] ordinals) TaxonomyOrdLabelBiMap.getLabels
(int[] ordinals) Methods in org.apache.lucene.sandbox.facet.labels with parameters of type FacetLabelModifier and TypeMethodDescriptionint
LabelToOrd.getOrd
(FacetLabel label) get ord for one labelint
TaxonomyOrdLabelBiMap.getOrd
(FacetLabel label) int[]
LabelToOrd.getOrds
(FacetLabel[] labels) get ords for multiple labelsint[]
TaxonomyOrdLabelBiMap.getOrds
(FacetLabel[] labels)