Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Field Summary

Fields inherited from class org.apache.lucene.facet.index.CategoryDocumentBuilder
`categoriesMap, fieldList, indexingParams, taxonomyWriter`

Constructor Summary
`EnhancementsDocumentBuilder(TaxonomyWriter taxonomyWriter, EnhancementsIndexingParams params)`

Method Summary
`protected CategoryListTokenizer` | `getCategoryListTokenizer(TokenStream categoryStream)` Get a category list tokenizer (or a series of such tokenizers) to create the category list tokens.
`protected CategoryTokenizer` | `getCategoryTokenizer(TokenStream categoryStream)` Get a `CategoryTokenizer` to create the category tokens.
`protected TokenStream` | `getParentsStream(CategoryAttributesStream categoryAttributesStream)` Get a stream of categories which includes the parents, according to policies defined in indexing parameters.

Methods inherited from class org.apache.lucene.facet.index.CategoryDocumentBuilder
`build, fillCategoriesMap, getCountingListTokenizer, setCategories, setCategoryPaths`

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

Constructor Detail

### EnhancementsDocumentBuilder

    public EnhancementsDocumentBuilder(TaxonomyWriter taxonomyWriter,
                                       EnhancementsIndexingParams params)
                                throws IOException

Parameters:
  `taxonomyWriter` -
  `params` - Indexing params which include `CategoryEnhancement`s.
Throws:
  `IOException`

Method Detail

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD