## org.apache.lucene.facet.enhancements
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

    public class EnhancementsCategoryTokenizer

extends CategoryTokenizer

A tokenizer which adds to each category token payload according to the `CategoryEnhancement`s defined in the given `EnhancementsIndexingParams`.

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
`protected byte[][]` `enhancementBytes` Buffers for enhancement payload bytes
`protected List<CategoryEnhancement>` `enhancements` The category enhancements to handle
`protected 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`

Fields inherited from class org.apache.lucene.analysis.TokenFilter
`input`

Constructor Summary
`EnhancementsCategoryTokenizer(TokenStream input, EnhancementsIndexingParams indexingParams)` Constructor.

Method Summary
`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.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`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

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: `CategoryTokenizer`
  Set the payload of the current category token.

  Overrides:
    `setPayload` in class `CategoryTokenizer`