public class FunctionSecondPassGroupingCollector extends AbstractSecondPassGroupingCollector<MutableValue>
AbstractSecondPassGroupingCollector that groups based on
ValueSource instances.AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE>groupDocs, groupMap| Constructor and Description |
|---|
FunctionSecondPassGroupingCollector(Collection<SearchGroup<MutableValue>> searchGroups,
Sort groupSort,
Sort withinGroupSort,
int maxDocsPerGroup,
boolean getScores,
boolean getMaxScores,
boolean fillSortFields,
ValueSource groupByVS,
Map<?,?> vsContext)
Constructs a
FunctionSecondPassGroupingCollector instance. |
| Modifier and Type | Method and Description |
|---|---|
protected AbstractSecondPassGroupingCollector.SearchGroupDocs<MutableValue> |
retrieveGroup(int doc)
Returns the group the specified doc belongs to or
null if no group could be retrieved. |
void |
setNextReader(AtomicReaderContext readerContext) |
acceptsDocsOutOfOrder, collect, getTopGroups, setScorerpublic FunctionSecondPassGroupingCollector(Collection<SearchGroup<MutableValue>> searchGroups, Sort groupSort, Sort withinGroupSort, int maxDocsPerGroup, boolean getScores, boolean getMaxScores, boolean fillSortFields, ValueSource groupByVS, Map<?,?> vsContext) throws IOException
FunctionSecondPassGroupingCollector instance.searchGroups - The SearchGroup instances collected during the first phase.groupSort - The group sortwithinGroupSort - The sort inside a groupmaxDocsPerGroup - The maximum number of documents to collect inside a groupgetScores - Whether to include the scoresgetMaxScores - Whether to include the maximum scorefillSortFields - Whether to fill the sort values in TopGroups.withinGroupSortgroupByVS - The ValueSource to group byvsContext - The value source contextIOException - IOException When I/O related errors occurprotected AbstractSecondPassGroupingCollector.SearchGroupDocs<MutableValue> retrieveGroup(int doc) throws IOException
AbstractSecondPassGroupingCollectornull if no group could be retrieved.retrieveGroup in class AbstractSecondPassGroupingCollector<MutableValue>doc - The specified docnull if no group could be retrievedIOException - If an I/O related error occurredpublic void setNextReader(AtomicReaderContext readerContext) throws IOException
setNextReader in class AbstractSecondPassGroupingCollector<MutableValue>IOExceptionCopyright © 2000-2014 Apache Software Foundation. All Rights Reserved.