org.apache.lucene.facet.util

## Class PartitionsUtils

- java.lang.Object
- - org.apache.lucene.facet.util.PartitionsUtils

-     public final class PartitionsUtils
      extends Object

  Utilities for partitions - sizes and such
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `PART_NAME_PREFIX` The prefix that is added to the name of the partition.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PartitionsUtils()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `partitionName(int partition)` Partition name by its number
    `static String` | `partitionNameByOrdinal(FacetIndexingParams iParams, int ordinal)` Partition name by category ordinal
    `static int` | `partitionNumber(FacetIndexingParams iParams, int ordinal)` Partition number of an ordinal.
    `static int` | `partitionSize(FacetIndexingParams indexingParams, TaxonomyReader taxonomyReader)` Get the partition size in this parameter, or return the size of the taxonomy, which is smaller.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### PART_NAME_PREFIX

          public static final String PART_NAME_PREFIX

      The prefix that is added to the name of the partition.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### PartitionsUtils

          public PartitionsUtils()

  - ### Method Detail

    - #### partitionSize

          public static final int partitionSize(FacetIndexingParams indexingParams,
                          TaxonomyReader taxonomyReader)

      Get the partition size in this parameter, or return the size of the taxonomy, which is smaller. (Guarantees usage of as little memory as possible at search time).

    - #### partitionNumber

          public static final int partitionNumber(FacetIndexingParams iParams,
                            int ordinal)

      Partition number of an ordinal.

      This allows to locate the partition containing a certain (facet) ordinal.

      See Also:
        `FacetIndexingParams.getPartitionSize()`

    - #### partitionNameByOrdinal

          public static final String partitionNameByOrdinal(FacetIndexingParams iParams,
                                      int ordinal)

      Partition name by category ordinal

    - #### partitionName

          public static final String partitionName(int partition)

      Partition name by its number

Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.