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>groupDocs, groupMap| Constructor and Description |
|---|
TermSecondPassGroupingCollector(String groupField,
Collection<SearchGroup<BytesRef>> groups,
Sort groupSort,
Sort withinGroupSort,
int maxDocsPerGroup,
boolean getScores,
boolean getMaxScores,
boolean fillSortFields) |
| Modifier and Type | Method and Description |
|---|---|
protected AbstractSecondPassGroupingCollector.SearchGroupDocs<BytesRef> |
retrieveGroup(int doc)
Returns the group the specified doc belongs to or
null if no group could be retrieved. |
void |
setNextReader(AtomicReaderContext readerContext)
Called before collecting from each
AtomicReaderContext. |
acceptsDocsOutOfOrder, collect, getTopGroups, setScorerpublic TermSecondPassGroupingCollector(String groupField, Collection<SearchGroup<BytesRef>> groups, Sort groupSort, Sort withinGroupSort, int maxDocsPerGroup, boolean getScores, boolean getMaxScores, boolean fillSortFields) throws IOException
IOExceptionpublic void setNextReader(AtomicReaderContext readerContext) throws IOException
CollectorAtomicReaderContext. All doc ids in
Collector.collect(int) will correspond to IndexReaderContext.reader().
Add AtomicReaderContext.docBase to the current IndexReaderContext.reader()'s
internal document id to re-base ids in Collector.collect(int).setNextReader in class AbstractSecondPassGroupingCollector<BytesRef>readerContext - next atomic reader contextIOExceptionprotected AbstractSecondPassGroupingCollector.SearchGroupDocs<BytesRef> retrieveGroup(int doc) throws IOException
AbstractSecondPassGroupingCollectornull if no group could be retrieved.retrieveGroup in class AbstractSecondPassGroupingCollector<BytesRef>doc - The specified docnull if no group could be retrievedIOException - If an I/O related error occurredCopyright © 2000-2016 The Apache Software Foundation. All Rights Reserved.