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 void |
doSetNextReader(LeafReaderContext readerContext) |
boolean |
needsScores() |
protected AbstractSecondPassGroupingCollector.SearchGroupDocs<MutableValue> |
retrieveGroup(int doc)
Returns the group the specified doc belongs to or
null if no group could be retrieved. |
collect, getTopGroups, setScorergetLeafCollectorpublic 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 occurredprotected void doSetNextReader(LeafReaderContext readerContext) throws IOException
doSetNextReader in class AbstractSecondPassGroupingCollector<MutableValue>IOExceptionpublic boolean needsScores()
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.