public static enum CategoryListParams.OrdinalPolicy extends Enum<CategoryListParams.OrdinalPolicy>
|Enum Constant and Description|
Encodes the ordinals of all path components except the dimension.
Encodes the ordinals of all path components.
Encodes only the ordinals of leaf nodes.
|Modifier and Type||Method and Description|
Returns the enum constant of this type with the specified name.
Returns an array containing the constants of this enum type, in the order they are declared.
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
public static final CategoryListParams.OrdinalPolicy NO_PARENTS
ALL_PARENTS, and the counts of all path components will be computed as well.
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
public static final CategoryListParams.OrdinalPolicy ALL_PARENTS
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
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
public static CategoryListParams.OrdinalPolicy values()
for (CategoryListParams.OrdinalPolicy c : CategoryListParams.OrdinalPolicy.values()) System.out.println(c);
public static CategoryListParams.OrdinalPolicy valueOf(String name)
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.