public abstract class TermGroupFacetCollector extends AbstractGroupFacetCollector
AbstractGroupFacetCollector
that computes grouped facets based on the indexed terms
from DocValues.AbstractGroupFacetCollector.FacetEntry, AbstractGroupFacetCollector.GroupedFacetResult, AbstractGroupFacetCollector.SegmentResult
endFacetOrd, facetField, facetPrefix, groupField, segmentFacetCounts, segmentResults, segmentTotalCount, startFacetOrd
Modifier and Type | Method and Description |
---|---|
static TermGroupFacetCollector |
createTermGroupFacetCollector(String groupField,
String facetField,
boolean facetFieldMultivalued,
BytesRef facetPrefix,
int initialSize)
Factory method for creating the right implementation based on the fact whether the facet field contains
multiple tokens per documents.
|
boolean |
needsScores() |
createSegmentResult, mergeSegmentResults, setScorer
collect, doSetNextReader, getLeafCollector
public static TermGroupFacetCollector createTermGroupFacetCollector(String groupField, String facetField, boolean facetFieldMultivalued, BytesRef facetPrefix, int initialSize)
groupField
- The group fieldfacetField
- The facet fieldfacetFieldMultivalued
- Whether the facet field has multiple tokens per documentfacetPrefix
- The facet prefix a facet entry should start with to be included.initialSize
- The initial allocation size of the internal int set and group facet list which should roughly
match the total number of expected unique groups. Be aware that the heap usage is
4 bytes * initialSize.TermGroupFacetCollector
implementationpublic boolean needsScores()
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.