Module org.apache.lucene.sandbox
Interface FacetCutter
- All Known Implementing Classes:
DoubleRangeFacetCutter
,LongRangeFacetCutter
,LongValueFacetCutter
,NonOverlappingLongRangeFacetCutter
,OverlappingLongRangeFacetCutter
,TaxonomyFacetsCutter
public interface FacetCutter
Creates
LeafFacetCutter
for each leaf.
TODO: do we need FacetCutterManager similar to CollectorManager, e.g. is createLeafCutter always thread safe?
-
Method Summary
Modifier and TypeMethodDescriptioncreateLeafCutter
(LeafReaderContext context) Get cutter for the leaf.default OrdinalIterator
getChildrenOrds
(int ord) For facets that have hierarchy (levels), get all children ordinals for given ord.default OrdinalIterator
For facets that have hierarchy (levels), return all top level dimension ordinals that require rollup.
-
Method Details
-
createLeafCutter
Get cutter for the leaf.- Throws:
IOException
-
getOrdinalsToRollup
For facets that have hierarchy (levels), return all top level dimension ordinals that require rollup.Rollup is an optimization for facets types that support hierarchy, if single document belongs to at most one node in the hierarchy, we can first record data for these nodes only, and then roll up values to parent ordinals.
Default implementation returns null, which means that rollup is not needed.
- Throws:
IOException
-
getChildrenOrds
For facets that have hierarchy (levels), get all children ordinals for given ord.- Throws:
IOException
-