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
CategoryListTokenizerthroughCategoryEnhancement.getCategoryListTokenizer(). TheCategoryListTokenizershould 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 theCategoryEnhancements defined in the givenEnhancementsIndexingParams.EnhancementsDocumentBuilder AnEnhancementsDocumentBuilderis aCategoryDocumentBuilderwhich adds categories to documents according to the list ofCategoryEnhancements fromEnhancementsIndexingParams.EnhancementsPayloadIterator APayloadIteratorfor iterating over category posting lists generated usingEnhancementsCategoryTokenizer.