org.apache.lucene.search.grouping
Class AbstractGroupFacetCollector
java.lang.Object
org.apache.lucene.search.Collector
org.apache.lucene.search.grouping.AbstractGroupFacetCollector
- Direct Known Subclasses:
- TermGroupFacetCollector
public abstract class AbstractGroupFacetCollector
- extends Collector
Base class for computing grouped facets.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
groupField
protected final String groupField
facetField
protected final String facetField
facetPrefix
protected final BytesRef facetPrefix
segmentResults
protected final List<AbstractGroupFacetCollector.SegmentResult> segmentResults
segmentFacetCounts
protected int[] segmentFacetCounts
segmentTotalCount
protected int segmentTotalCount
startFacetOrd
protected int startFacetOrd
endFacetOrd
protected int endFacetOrd
AbstractGroupFacetCollector
protected AbstractGroupFacetCollector(String groupField,
String facetField,
BytesRef facetPrefix)
mergeSegmentResults
public AbstractGroupFacetCollector.GroupedFacetResult mergeSegmentResults(int size,
int minCount,
boolean orderByCount)
throws IOException
- Returns grouped facet results that were computed over zero or more segments.
Grouped facet counts are merged from zero or more segment results.
- Parameters:
size
- The total number of facets to include. This is typically offset + limitminCount
- The minimum count a facet entry should have to be included in the grouped facet resultorderByCount
- Whether to sort the facet entries by facet entry count. If false
then the facets
are sorted lexicographically in ascending order.
- Returns:
- grouped facet results
- Throws:
IOException
- If I/O related errors occur during merging segment grouped facet counts.
createSegmentResult
protected abstract AbstractGroupFacetCollector.SegmentResult createSegmentResult()
throws IOException
- Throws:
IOException
setScorer
public void setScorer(Scorer scorer)
throws IOException
- Specified by:
setScorer
in class Collector
- Throws:
IOException
acceptsDocsOutOfOrder
public boolean acceptsDocsOutOfOrder()
- Specified by:
acceptsDocsOutOfOrder
in class Collector
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.