public class FunctionSecondPassGroupingCollector extends SecondPassGroupingCollector<MutableValue>
SecondPassGroupingCollector
that groups based on
ValueSource
instances.SecondPassGroupingCollector.SearchGroupDocs<T>
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) |
protected SecondPassGroupingCollector.SearchGroupDocs<MutableValue> |
retrieveGroup(int doc)
Returns the group the specified doc belongs to or
null if no group could be retrieved. |
collect, getTopGroups, needsScores, setScorer
getLeafCollector
public 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.withinGroupSort
groupByVS
- The ValueSource
to group byvsContext
- The value source contextIOException
- IOException When I/O related errors occurprotected SecondPassGroupingCollector.SearchGroupDocs<MutableValue> retrieveGroup(int doc) throws IOException
SecondPassGroupingCollector
null
if no group could be retrieved.retrieveGroup
in class SecondPassGroupingCollector<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 SecondPassGroupingCollector<MutableValue>
IOException
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.