public static enum CategoryListParams.OrdinalPolicy extends Enum<CategoryListParams.OrdinalPolicy>
Enum Constant and Description |
---|
ALL_BUT_DIMENSION
Encodes the ordinals of all path components except the dimension.
|
ALL_PARENTS
Encodes the ordinals of all path components.
|
NO_PARENTS
Encodes only the ordinals of leaf nodes.
|
Modifier and Type | Method and Description |
---|---|
static CategoryListParams.OrdinalPolicy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CategoryListParams.OrdinalPolicy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CategoryListParams.OrdinalPolicy NO_PARENTS
ALL_PARENTS
, and the counts of all path components
will be computed as well.
NOTE: this CategoryListParams.OrdinalPolicy
requires a special collector or
accumulator, which will fix the parents' counts.
NOTE: since only leaf nodes are encoded for the document, you
should use this policy when the same document doesn't share two
categories that have a mutual parent, or otherwise the counts will be
wrong (the mutual parent will be over-counted). For example, if a
document has the categories A/B/C and A/B/D, then with this policy the
counts of "A" and "B" will be 2, which is wrong. If you intend to index
hierarchical dimensions, with more than one category per document, you
should use either ALL_PARENTS
or ALL_BUT_DIMENSION
.
public static final CategoryListParams.OrdinalPolicy ALL_PARENTS
ALL_BUT_DIMENSION
.public static final CategoryListParams.OrdinalPolicy ALL_BUT_DIMENSION
CategoryPath.components
. For the category A/B/C, the ordinal of
A/B will be encoded as well, however not the ordinal of A.
NOTE: when facets are aggregated, this policy behaves exactly like
ALL_PARENTS
, except that the dimension is never counted. I.e. if
you ask to count the facet "A", then while in ALL_PARENTS
you
will get counts for "A" and its children, with this policy you
will get counts for only its children. This policy is the default
one, and makes sense for using with flat dimensions, whenever your
application does not require the dimension's count. Otherwise, use
ALL_PARENTS
.
public static CategoryListParams.OrdinalPolicy[] values()
for (CategoryListParams.OrdinalPolicy c : CategoryListParams.OrdinalPolicy.values()) System.out.println(c);
public static CategoryListParams.OrdinalPolicy valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullCopyright © 2000-2013 Apache Software Foundation. All Rights Reserved.