Class CategoryTokenizerBase
- 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
-
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
CategoryListTokenizer,CategoryTokenizer
public abstract class CategoryTokenizerBase extends org.apache.lucene.analysis.TokenFilterA base class for all token filters which add term and payload attributes to tokens and are to be used inCategoryDocumentBuilder. Contains three attributes:CategoryAttribute,CharTermAttributeandPayloadAttribute.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Field Summary
Fields Modifier and Type Field Description protected CategoryAttributecategoryAttributeThe stream's category attributes.protected FacetIndexingParamsindexingParamsIndexing params for creating term textprotected org.apache.lucene.index.PayloadpayloadThe object used for constructing payloads.protected org.apache.lucene.analysis.tokenattributes.PayloadAttributepayloadAttributeThe stream's payload attribute.protected org.apache.lucene.analysis.tokenattributes.CharTermAttributetermAttributeThe stream's term attribute.
-
Constructor Summary
Constructors Constructor Description CategoryTokenizerBase(org.apache.lucene.analysis.TokenStream input, FacetIndexingParams indexingParams)Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract booleanincrementToken()-
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
-
categoryAttribute
protected CategoryAttribute categoryAttribute
The stream's category attributes.
-
payloadAttribute
protected org.apache.lucene.analysis.tokenattributes.PayloadAttribute payloadAttribute
The stream's payload attribute.
-
termAttribute
protected org.apache.lucene.analysis.tokenattributes.CharTermAttribute termAttribute
The stream's term attribute.
-
payload
protected org.apache.lucene.index.Payload payload
The object used for constructing payloads.
-
indexingParams
protected FacetIndexingParams indexingParams
Indexing params for creating term text
-
-
Constructor Detail
-
CategoryTokenizerBase
public CategoryTokenizerBase(org.apache.lucene.analysis.TokenStream input, FacetIndexingParams indexingParams)Constructor.- Parameters:
input- The input stream, eitherCategoryParentsStreamor an extension ofCategoryTokenizerBase.indexingParams- The indexing params to use.
-
-
Method Detail
-
incrementToken
public abstract boolean incrementToken() throws IOException- Specified by:
incrementTokenin classorg.apache.lucene.analysis.TokenStream- Throws:
IOException
-
-