Package org.apache.lucene.facet.enhancements
Enhanced category features
Mechanisms for addition of enhanced category features.A CategoryEnhancement
(which can correspond to a
CategoryProperty
)
can contribute to the index in two possible ways:
- To each category with data relevant to the enhancement,
add this data to the category's token payload, through
CategoryEnhancement.getCategoryTokenBytes()
. This data will be read during search usingCategoryEnhancement.extractCategoryTokenData()
. - To each document which contains categories with data relevant to the enhancement, add a
CategoryListTokenizer
throughCategoryEnhancement.getCategoryListTokenizer()
. TheCategoryListTokenizer
should add a single token which includes all the enhancement relevant data from the categories. The category list token's text is defined byCategoryEnhancement.getCategoryListTermText()
.
-
Interface Summary Interface Description CategoryEnhancement This interface allows easy addition of enhanced category features. -
Class Summary Class Description EnhancementsCategoryTokenizer A tokenizer which adds to each category token payload according to theCategoryEnhancement
s defined in the givenEnhancementsIndexingParams
.EnhancementsDocumentBuilder AnEnhancementsDocumentBuilder
is aCategoryDocumentBuilder
which adds categories to documents according to the list ofCategoryEnhancement
s fromEnhancementsIndexingParams
.EnhancementsPayloadIterator APayloadIterator
for iterating over category posting lists generated usingEnhancementsCategoryTokenizer
.