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

Constructor Summary
`PartitionsUtils()`

Method Summary
`static String` `partitionName(CategoryListParams clParams, int partition)` Partition name by its number
`static String` `partitionNameByOrdinal(FacetIndexingParams iParams, CategoryListParams clParams, int ordinal)` Partition name by category ordinal
`static int` `partitionNumber(FacetIndexingParams iParams, int ordinal)` Partition number of an ordinal.
`static int` `partitionNumber(FacetSearchParams sParams, int ordinal)`
`static int` `partitionOffset(FacetIndexingParams iParams, int partitionNumber, TaxonomyReader taxonomyReader)` Get the offset for a given partition.
`static int` `partitionOffset(FacetSearchParams sParams, int partitionNumber, TaxonomyReader taxonomyReader)`
`static int` `partitionSize(FacetIndexingParams indexingParams, TaxonomyReader taxonomyReader)` Get the partition size in this parameter, or return the size of the taxonomy, which is smaller.
`static int` `partitionSize(FacetSearchParams sParams, TaxonomyReader taxonomyReader)`

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

Constructor Detail

### PartitionsUtils

    public PartitionsUtils()

Method Detail

### partitionOffset

    public static final int partitionOffset(FacetIndexingParams iParams,
                                            int partitionNumber,
                                            TaxonomyReader taxonomyReader)

  Get the offset for a given partition. That is, what is the minimum number an ordinal could be for a particular partition.

### partitionOffset

    public static final int partitionOffset(FacetSearchParams sParams,
                                            int partitionNumber,
                                            TaxonomyReader taxonomyReader)

  See Also:
    `partitionOffset(FacetIndexingParams, int, TaxonomyReader)`

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

### partitionSize

    public static final int partitionSize(FacetSearchParams sParams,
                                          TaxonomyReader taxonomyReader)

  See Also:
    `partitionSize(FacetIndexingParams, TaxonomyReader)`

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

### partitionNumber

    public static final int partitionNumber(FacetSearchParams sParams,
                                            int ordinal)

  See Also:
    `partitionNumber(FacetIndexingParams, int)`

### partitionNameByOrdinal

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

  Partition name by category ordinal

### partitionName

    public static final String partitionName(CategoryListParams clParams,
                                             int partition)

  Partition name by its number