Class NonTopLevelPathPolicy
- java.lang.Object
-
- org.apache.lucene.facet.index.categorypolicy.NonTopLevelPathPolicy
-
- All Implemented Interfaces:
Serializable,PathPolicy
public class NonTopLevelPathPolicy extends Object implements PathPolicy
This class filters our the ROOT category, and it's direct descendants. For more information seePathPolicy.- See Also:
- Serialized Form
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Field Summary
Fields Modifier and Type Field Description intDEFAULT_MINIMAL_SUBPATH_LENGTHThe shortest path length delivered is two components (root + one child).
-
Constructor Summary
Constructors Constructor Description NonTopLevelPathPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanshouldAdd(CategoryPath categoryPath)Filters out (returns false) CategoryPaths equal or less thanTaxonomyReader.ROOT_ORDINAL.
-
-
-
Field Detail
-
DEFAULT_MINIMAL_SUBPATH_LENGTH
public final int DEFAULT_MINIMAL_SUBPATH_LENGTH
The shortest path length delivered is two components (root + one child).- See Also:
- Constant Field Values
-
-
Method Detail
-
shouldAdd
public boolean shouldAdd(CategoryPath categoryPath)
Filters out (returns false) CategoryPaths equal or less thanTaxonomyReader.ROOT_ORDINAL. true otherwise.- Specified by:
shouldAddin interfacePathPolicy- Parameters:
categoryPath- A given category path which is to be tested for stream addition.- Returns:
trueif the category path should be added.falseotherwise.
-
-