public class TermSecondPassGroupingCollector extends AbstractSecondPassGroupingCollector<BytesRef>
AbstractSecondPassGroupingCollector that groups based on
field values and more specifically uses SortedDocValues
to collect grouped docs.AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE>| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
groupField |
private SortedDocValues |
index |
private SentinelIntSet |
ordSet |
groupDocs, groupMap| Constructor and Description |
|---|
TermSecondPassGroupingCollector(java.lang.String groupField,
java.util.Collection<SearchGroup<BytesRef>> groups,
Sort groupSort,
Sort withinGroupSort,
int maxDocsPerGroup,
boolean getScores,
boolean getMaxScores,
boolean fillSortFields) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doSetNextReader(LeafReaderContext readerContext)
This method is called before collecting
context. |
protected AbstractSecondPassGroupingCollector.SearchGroupDocs<BytesRef> |
retrieveGroup(int doc)
Returns the group the specified doc belongs to or
null if no group could be retrieved. |
collect, getTopGroups, needsScores, setScorergetLeafCollectorprivate final java.lang.String groupField
private final SentinelIntSet ordSet
private SortedDocValues index
public TermSecondPassGroupingCollector(java.lang.String groupField,
java.util.Collection<SearchGroup<BytesRef>> groups,
Sort groupSort,
Sort withinGroupSort,
int maxDocsPerGroup,
boolean getScores,
boolean getMaxScores,
boolean fillSortFields)
throws java.io.IOException
java.io.IOExceptionprotected void doSetNextReader(LeafReaderContext readerContext) throws java.io.IOException
SimpleCollectorcontext.doSetNextReader in class AbstractSecondPassGroupingCollector<BytesRef>java.io.IOExceptionprotected AbstractSecondPassGroupingCollector.SearchGroupDocs<BytesRef> retrieveGroup(int doc) throws java.io.IOException
AbstractSecondPassGroupingCollectornull if no group could be retrieved.retrieveGroup in class AbstractSecondPassGroupingCollector<BytesRef>doc - The specified docnull if no group could be retrievedjava.io.IOException - If an I/O related error occurred