Class DefaultOrdinalPolicy
- java.lang.Object
-
- org.apache.lucene.facet.index.categorypolicy.DefaultOrdinalPolicy
-
- All Implemented Interfaces:
Serializable,OrdinalPolicy
public class DefaultOrdinalPolicy extends Object implements OrdinalPolicy
This class filters our the ROOT category ID. For more information seeOrdinalPolicy.- See Also:
- Serialized Form
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Constructor Summary
Constructors Constructor Description DefaultOrdinalPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinit(TaxonomyWriter taxonomyWriter)Implemented as NO-OP as the default is not taxonomy dependentbooleanshouldAdd(int ordinal)Filters out (returns false) ordinals equal or less thanTaxonomyReader.ROOT_ORDINAL.
-
-
-
Method Detail
-
shouldAdd
public boolean shouldAdd(int ordinal)
Filters out (returns false) ordinals equal or less thanTaxonomyReader.ROOT_ORDINAL. true otherwise.- Specified by:
shouldAddin interfaceOrdinalPolicy- Parameters:
ordinal- A given category ordinal which is to be tested for stream addition.- Returns:
trueif the category should be added.falseotherwise.
-
init
public void init(TaxonomyWriter taxonomyWriter)
Implemented as NO-OP as the default is not taxonomy dependent- Specified by:
initin interfaceOrdinalPolicy- Parameters:
taxonomyWriter- A relevant taxonomyWriter object, with which ordinals sent toOrdinalPolicy.shouldAdd(int)are examined.
-
-