public class FunctionSecondPassGroupingCollector extends AbstractSecondPassGroupingCollector<MutableValue>
AbstractSecondPassGroupingCollector that groups based on
ValueSource instances.AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE>| Modifier and Type | Field and Description |
|---|---|
private FunctionValues.ValueFiller |
filler |
private ValueSource |
groupByVS |
private MutableValue |
mval |
private java.util.Map<?,?> |
vsContext |
groupDocs, groupMap| Constructor and Description |
|---|
FunctionSecondPassGroupingCollector(java.util.Collection<SearchGroup<MutableValue>> searchGroups,
Sort groupSort,
Sort withinGroupSort,
int maxDocsPerGroup,
boolean getScores,
boolean getMaxScores,
boolean fillSortFields,
ValueSource groupByVS,
java.util.Map<?,?> vsContext)
Constructs a
FunctionSecondPassGroupingCollector instance. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doSetNextReader(LeafReaderContext readerContext)
This method is called before collecting
context. |
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, needsScores, setScorergetLeafCollectorprivate final ValueSource groupByVS
private final java.util.Map<?,?> vsContext
private FunctionValues.ValueFiller filler
private MutableValue mval
public FunctionSecondPassGroupingCollector(java.util.Collection<SearchGroup<MutableValue>> searchGroups, Sort groupSort, Sort withinGroupSort, int maxDocsPerGroup, boolean getScores, boolean getMaxScores, boolean fillSortFields, ValueSource groupByVS, java.util.Map<?,?> vsContext) throws java.io.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 contextjava.io.IOException - IOException When I/O related errors occurprotected AbstractSecondPassGroupingCollector.SearchGroupDocs<MutableValue> retrieveGroup(int doc) throws java.io.IOException
AbstractSecondPassGroupingCollectornull if no group could be retrieved.retrieveGroup in class AbstractSecondPassGroupingCollector<MutableValue>doc - The specified docnull if no group could be retrievedjava.io.IOException - If an I/O related error occurredprotected void doSetNextReader(LeafReaderContext readerContext) throws java.io.IOException
SimpleCollectorcontext.doSetNextReader in class AbstractSecondPassGroupingCollector<MutableValue>java.io.IOException