Class EnhancementsCategoryTokenizer
- java.lang.Object
-
- org.apache.lucene.util.AttributeSource
-
- org.apache.lucene.analysis.TokenStream
-
- org.apache.lucene.analysis.TokenFilter
-
- org.apache.lucene.facet.index.streaming.CategoryTokenizerBase
-
- org.apache.lucene.facet.index.streaming.CategoryTokenizer
-
- org.apache.lucene.facet.enhancements.EnhancementsCategoryTokenizer
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class EnhancementsCategoryTokenizer extends CategoryTokenizer
A tokenizer which adds to each category token payload according to theCategoryEnhancements defined in the givenEnhancementsIndexingParams.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[][]enhancementBytesBuffers for enhancement payload bytesprotected List<CategoryEnhancement>enhancementsThe category enhancements to handleprotected byte[]payloadBytesThe data buffer used for payload instance.-
Fields inherited from class org.apache.lucene.facet.index.streaming.CategoryTokenizerBase
categoryAttribute, indexingParams, payload, payloadAttribute, termAttribute
-
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
-
-
Constructor Summary
Constructors Constructor Description EnhancementsCategoryTokenizer(TokenStream input, EnhancementsIndexingParams indexingParams)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidsetPayload()Set the payload of the current category token.-
Methods inherited from class org.apache.lucene.facet.index.streaming.CategoryTokenizer
incrementToken
-
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
-
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
-
-
-
-
Field Detail
-
payloadBytes
protected byte[] payloadBytes
The data buffer used for payload instance.
-
enhancements
protected List<CategoryEnhancement> enhancements
The category enhancements to handle
-
enhancementBytes
protected byte[][] enhancementBytes
Buffers for enhancement payload bytes
-
-
Constructor Detail
-
EnhancementsCategoryTokenizer
public EnhancementsCategoryTokenizer(TokenStream input, EnhancementsIndexingParams indexingParams) throws IOException
Constructor.- Parameters:
input- The stream of category tokens.indexingParams- The indexing params to use.- Throws:
IOException
-
-
Method Detail
-
setPayload
protected void setPayload()
Description copied from class:CategoryTokenizerSet the payload of the current category token.- Overrides:
setPayloadin classCategoryTokenizer
-
-