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 theCategoryEnhancement
s defined in the givenEnhancementsIndexingParams
.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[][]
enhancementBytes
Buffers for enhancement payload bytesprotected List<CategoryEnhancement>
enhancements
The category enhancements to handleprotected byte[]
payloadBytes
The data buffer used for payload instance.-
Fields inherited from class org.apache.lucene.facet.index.streaming.CategoryTokenizerBase
categoryAttribute, indexingParams, payload, payloadAttribute, termAttribute
-
-
Constructor Summary
Constructors Constructor Description EnhancementsCategoryTokenizer(org.apache.lucene.analysis.TokenStream input, EnhancementsIndexingParams indexingParams)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
setPayload()
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.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(org.apache.lucene.analysis.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:CategoryTokenizer
Set the payload of the current category token.- Overrides:
setPayload
in classCategoryTokenizer
-
-