public class CategoryListParams extends Object
Modifier and Type | Class and Description |
---|---|
static class |
CategoryListParams.OrdinalPolicy
Defines which category ordinals are encoded for every document.
|
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_FIELD
The default field used to store the facets information.
|
static CategoryListParams.OrdinalPolicy |
DEFAULT_ORDINAL_POLICY
The default
CategoryListParams.OrdinalPolicy that's used when encoding a document's
category ordinals. |
String |
field |
Constructor and Description |
---|
CategoryListParams()
Constructs a default category list parameters object, using
DEFAULT_FIELD . |
CategoryListParams(String field)
Constructs a category list parameters object, using the given field.
|
Modifier and Type | Method and Description |
---|---|
CategoryListIterator |
createCategoryListIterator(int partition)
Create the
CategoryListIterator for the specified partition. |
IntEncoder |
createEncoder()
Allows to override how categories are encoded and decoded.
|
boolean |
equals(Object o) |
CategoryListParams.OrdinalPolicy |
getOrdinalPolicy(String dimension)
Returns the
CategoryListParams.OrdinalPolicy to use for the given dimension. |
int |
hashCode() |
String |
toString() |
public static final String DEFAULT_FIELD
public static final CategoryListParams.OrdinalPolicy DEFAULT_ORDINAL_POLICY
CategoryListParams.OrdinalPolicy
that's used when encoding a document's
category ordinals.public final String field
public CategoryListParams()
DEFAULT_FIELD
.public CategoryListParams(String field)
public IntEncoder createEncoder()
IntDecoder
is provided by the IntEncoder
.
Default implementation creates a new Sorting(Unique(DGap)) encoder. Uniqueness in this regard means when the same category appears twice in a document, only one appearance would be encoded. This has effect on facet counting results.
Some possible considerations when overriding may be:
public CategoryListIterator createCategoryListIterator(int partition) throws IOException
CategoryListIterator
for the specified partition.IOException
public CategoryListParams.OrdinalPolicy getOrdinalPolicy(String dimension)
CategoryListParams.OrdinalPolicy
to use for the given dimension. This
CategoryListParams
always returns DEFAULT_ORDINAL_POLICY
for all dimensions.Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.