## org.apache.lucene.facet.index.params
Class DefaultFacetIndexingParams

    java.lang.Object
      org.apache.lucene.facet.index.params.DefaultFacetIndexingParams

All Implemented Interfaces:
  Serializable, FacetIndexingParams

Direct Known Subclasses:
  PerDimensionIndexingParams

    public class DefaultFacetIndexingParams

extends Object
implements FacetIndexingParams

Default implementation for `FacetIndexingParams`.

Getters for partition-size, `OrdinalPolicy` and `PathPolicy` are all final, and so the proper way to modify them when extending this class is through `fixedPartitionSize()`, `fixedOrdinalPolicy()` or `fixedPathPolicy()` accordingly.

See Also:
  Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
`static char` `DEFAULT_FACET_DELIM_CHAR` delimiter between a categories in a path, e.g.

Constructor Summary
`DefaultFacetIndexingParams()`
`DefaultFacetIndexingParams(CategoryListParams categoryListParams)`

Method Summary
`int` `drillDownTermText(CategoryPath path, char[] buffer)` Return the drilldown Term-Text which does not need to do any allocations.
`boolean` `equals(Object obj)`
`protected OrdinalPolicy` `fixedOrdinalPolicy()` "fixed" ordinal policy.
`protected int` `fixedPartitionSize()` "fixed" partition size.
`protected PathPolicy` `fixedPathPolicy()` "fixed" path policy.
`Iterable<CategoryListParams>` `getAllCategoryListParams()` Return info about all category lists in the index.
`CategoryListParams` `getCategoryListParams(CategoryPath category)` The name of the category-list to put this category in, or null if this category should not be aggregatable.
`char` `getFacetDelimChar()` Use `DEFAULT_FACET_DELIM_CHAR` as the delimiter.
`OrdinalPolicy` `getOrdinalPolicy()` Get the policy for indexing category ordinals, used for deciding how "high" to climb in taxonomy from a category when ingesting its ordinals
`int` `getPartitionSize()` Get the partition size.
`PathPolicy` `getPathPolicy()` Get the policy for indexing category paths, used for deciding how "high" to climb in taxonomy from a category when ingesting its category paths.
`int` `hashCode()`

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

Field Detail

### DEFAULT_FACET_DELIM_CHAR

    public static final char DEFAULT_FACET_DELIM_CHAR

  delimiter between a categories in a path, e.g. Products FACET_DELIM Consumer FACET_DELIM Tv. This should be a character not found in any path component

  See Also:
    Constant Field Values

Constructor Detail

### DefaultFacetIndexingParams

    public DefaultFacetIndexingParams()

### DefaultFacetIndexingParams

    public DefaultFacetIndexingParams(CategoryListParams categoryListParams)

Method Detail

### getCategoryListParams

    public CategoryListParams getCategoryListParams(CategoryPath category)

  Description copied from interface: `FacetIndexingParams`
  The name of the category-list to put this category in, or null if this category should not be aggregatable.

  By default, all categories are written to the same category list, but applications which know in advance that in some situations only parts of the category hierarchy needs to be counted can divide the categories into two or more different category lists.

  If null is returned for a category, it means that this category should not appear in any category list, and thus counts for it cannot be aggregated. This category can still be used for drill-down, even though the count for it is not known.

  Specified by:
    `getCategoryListParams` in interface `FacetIndexingParams`

### drillDownTermText

    public int drillDownTermText(CategoryPath path,
                                 char[] buffer)

  Description copied from interface: `FacetIndexingParams`
  Return the drilldown Term-Text which does not need to do any allocations. The number of chars set is returned.

  Note: Make sure `buffer` is large enough.

  Specified by:
    `drillDownTermText` in interface `FacetIndexingParams`
  See Also:
    `CategoryPath.charsNeededForFullPath()`

### fixedPartitionSize

    protected int fixedPartitionSize()

  "fixed" partition size.

  See Also:
    `getPartitionSize()`

### fixedOrdinalPolicy

    protected OrdinalPolicy fixedOrdinalPolicy()

  "fixed" ordinal policy.

  See Also:
    `getOrdinalPolicy()`

### fixedPathPolicy

    protected PathPolicy fixedPathPolicy()

  "fixed" path policy.

  See Also:
    `getPathPolicy()`

### getPartitionSize

    public final int getPartitionSize()

  Description copied from interface: `FacetIndexingParams`
  Get the partition size. Same value should be used during the life time of an index. At search time this value is compared with actual taxonomy size and their minimum is used.

  Specified by:
    `getPartitionSize` in interface `FacetIndexingParams`

### getAllCategoryListParams

    public Iterable<CategoryListParams> getAllCategoryListParams()

  Description copied from interface: `FacetIndexingParams`
  Return info about all category lists in the index.

  Specified by:
    `getAllCategoryListParams` in interface `FacetIndexingParams`
  See Also:
    `FacetIndexingParams.getCategoryListParams(CategoryPath)`

### getOrdinalPolicy

    public final OrdinalPolicy getOrdinalPolicy()

  Description copied from interface: `FacetIndexingParams`
  Get the policy for indexing category ordinals, used for deciding how "high" to climb in taxonomy from a category when ingesting its ordinals

  Specified by:
    `getOrdinalPolicy` in interface `FacetIndexingParams`

### getPathPolicy

    public final PathPolicy getPathPolicy()

  Description copied from interface: `FacetIndexingParams`
  Get the policy for indexing category paths, used for deciding how "high" to climb in taxonomy from a category when ingesting its category paths.

  Specified by:
    `getPathPolicy` in interface `FacetIndexingParams`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`

### getFacetDelimChar

    public char getFacetDelimChar()

  Use `DEFAULT_FACET_DELIM_CHAR` as the delimiter.

  Specified by:
    `getFacetDelimChar` in interface `FacetIndexingParams`