org.apache.lucene.facet.enhancements
Class EnhancementsDocumentBuilder
java.lang.Object
org.apache.lucene.facet.index.CategoryDocumentBuilder
org.apache.lucene.facet.enhancements.EnhancementsDocumentBuilder
public class EnhancementsDocumentBuilder
- extends CategoryDocumentBuilder
An EnhancementsDocumentBuilder
is a CategoryDocumentBuilder
which adds categories to documents according to the list of
CategoryEnhancement
s from EnhancementsIndexingParams
. The
additions over CategoryDocumentBuilder
could be in both category
tokens, and additional category lists.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EnhancementsDocumentBuilder
public EnhancementsDocumentBuilder(TaxonomyWriter taxonomyWriter,
EnhancementsIndexingParams params)
throws IOException
- Parameters:
taxonomyWriter
- params
- Indexing params which include CategoryEnhancement
s.
- Throws:
IOException
getParentsStream
protected TokenStream getParentsStream(CategoryAttributesStream categoryAttributesStream)
- Description copied from class:
CategoryDocumentBuilder
- Get a stream of categories which includes the parents, according to
policies defined in indexing parameters.
- Overrides:
getParentsStream
in class CategoryDocumentBuilder
- Parameters:
categoryAttributesStream
- The input stream
- Returns:
- The parents stream.
- See Also:
OrdinalPolicy (for policy of adding category tokens for parents)
,
PathPolicy (for policy of adding category list tokens for parents)
getCategoryListTokenizer
protected CategoryListTokenizer getCategoryListTokenizer(TokenStream categoryStream)
- Description copied from class:
CategoryDocumentBuilder
- Get a category list tokenizer (or a series of such tokenizers) to create
the category list tokens.
- Overrides:
getCategoryListTokenizer
in class CategoryDocumentBuilder
- Parameters:
categoryStream
- A stream containing CategoryAttribute
with the
relevant data.
- Returns:
- The category list tokenizer (or series of tokenizers) to be used
in creating category list tokens.
getCategoryTokenizer
protected CategoryTokenizer getCategoryTokenizer(TokenStream categoryStream)
throws IOException
- Description copied from class:
CategoryDocumentBuilder
- Get a
CategoryTokenizer
to create the category tokens.
This method can be overridden for adding more attributes to the category
tokens.
- Overrides:
getCategoryTokenizer
in class CategoryDocumentBuilder
- Parameters:
categoryStream
- A stream containing CategoryAttribute
with the
relevant data.
- Returns:
- The
CategoryTokenizer
to be used in creating category
tokens.
- Throws:
IOException