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 void
init(TaxonomyWriter taxonomyWriter)
Implemented as NO-OP as the default is not taxonomy dependentboolean
shouldAdd(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:
shouldAdd
in interfaceOrdinalPolicy
- Parameters:
ordinal
- A given category ordinal which is to be tested for stream addition.- Returns:
true
if the category should be added.false
otherwise.
-
init
public void init(TaxonomyWriter taxonomyWriter)
Implemented as NO-OP as the default is not taxonomy dependent- Specified by:
init
in interfaceOrdinalPolicy
- Parameters:
taxonomyWriter
- A relevant taxonomyWriter object, with which ordinals sent toOrdinalPolicy.shouldAdd(int)
are examined.
-
-