Class MultiFacetsRecorder
- java.lang.Object
-
- org.apache.lucene.sandbox.facet.recorders.MultiFacetsRecorder
-
- All Implemented Interfaces:
FacetRecorder
public final class MultiFacetsRecorder extends Object implements FacetRecorder
FacetRecorder
that contains multiple FacetRecorders.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Constructor Summary
Constructors Constructor Description MultiFacetsRecorder(FacetRecorder... delegates)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(int ordinal)
Check if any data was recorded for provided facet ordinal.LeafFacetRecorder
getLeafRecorder(LeafReaderContext context)
Get leaf recorder.boolean
isEmpty()
True if there are no recordsOrdinalIterator
recordedOrds()
Return next collected ordinal, orOrdinalIterator.NO_MORE_ORDS
void
reduce(FacetCutter facetCutter)
Reduce leaf recorder results into this recorder.
-
-
-
Constructor Detail
-
MultiFacetsRecorder
public MultiFacetsRecorder(FacetRecorder... delegates)
Constructor
-
-
Method Detail
-
getLeafRecorder
public LeafFacetRecorder getLeafRecorder(LeafReaderContext context) throws IOException
Description copied from interface:FacetRecorder
Get leaf recorder.- Specified by:
getLeafRecorder
in interfaceFacetRecorder
- Throws:
IOException
-
recordedOrds
public OrdinalIterator recordedOrds()
Description copied from interface:FacetRecorder
Return next collected ordinal, orOrdinalIterator.NO_MORE_ORDS
- Specified by:
recordedOrds
in interfaceFacetRecorder
-
isEmpty
public boolean isEmpty()
Description copied from interface:FacetRecorder
True if there are no records- Specified by:
isEmpty
in interfaceFacetRecorder
-
reduce
public void reduce(FacetCutter facetCutter) throws IOException
Description copied from interface:FacetRecorder
Reduce leaf recorder results into this recorder. IfFacetCutter.getOrdinalsToRollup()
result is not null, it also rolls up values.After this method is called, it's illegal to add values to recorder, i.e. calling
FacetRecorder.getLeafRecorder(org.apache.lucene.index.LeafReaderContext)
orLeafFacetRecorder.record(int, int)
on its leaf recorders.- Specified by:
reduce
in interfaceFacetRecorder
- Throws:
IOException
-
contains
public boolean contains(int ordinal)
Description copied from interface:FacetRecorder
Check if any data was recorded for provided facet ordinal.- Specified by:
contains
in interfaceFacetRecorder
-
-