public class FunctionAllGroupHeadsCollector extends AllGroupHeadsCollector<MutableValue>
AllGroupHeadsCollector
for retrieving the most relevant groups when grouping
by ValueSource
.Modifier and Type | Class and Description |
---|---|
class |
FunctionAllGroupHeadsCollector.FunctionGroupHead
Holds current head document for a single group.
|
AllGroupHeadsCollector.GroupHead<T>, AllGroupHeadsCollector.TemporalResult
compIDXEnd, reversed, temporalResult
Constructor and Description |
---|
FunctionAllGroupHeadsCollector(ValueSource groupBy,
Map<?,?> vsContext,
Sort sortWithinGroup)
Constructs a
FunctionAllGroupHeadsCollector instance. |
Modifier and Type | Method and Description |
---|---|
protected void |
doSetNextReader(LeafReaderContext context) |
protected Collection<FunctionAllGroupHeadsCollector.FunctionGroupHead> |
getCollectedGroupHeads()
Returns the collected group heads.
|
boolean |
needsScores() |
protected void |
retrieveGroupHeadAndAddIfNotExist(int doc)
Returns the group head and puts it into
AllGroupHeadsCollector.temporalResult . |
void |
setScorer(Scorer scorer) |
collect, groupHeadsSize, retrieveGroupHeads, retrieveGroupHeads
getLeafCollector
public FunctionAllGroupHeadsCollector(ValueSource groupBy, Map<?,?> vsContext, Sort sortWithinGroup)
FunctionAllGroupHeadsCollector
instance.groupBy
- The ValueSource
to group byvsContext
- The ValueSource contextsortWithinGroup
- The sort within a groupprotected void retrieveGroupHeadAndAddIfNotExist(int doc) throws IOException
AllGroupHeadsCollector
AllGroupHeadsCollector.temporalResult
.
If the group head wasn't encountered before then it will be added to the collected group heads.
The AllGroupHeadsCollector.TemporalResult.stop
property will be true
if the group head wasn't encountered before
otherwise false
.
retrieveGroupHeadAndAddIfNotExist
in class AllGroupHeadsCollector<MutableValue>
doc
- The document to retrieve the group head for.IOException
- If I/O related errors occurprotected Collection<FunctionAllGroupHeadsCollector.FunctionGroupHead> getCollectedGroupHeads()
AllGroupHeadsCollector
getCollectedGroupHeads
in class AllGroupHeadsCollector<MutableValue>
public void setScorer(Scorer scorer) throws IOException
setScorer
in interface LeafCollector
setScorer
in class SimpleCollector
IOException
protected void doSetNextReader(LeafReaderContext context) throws IOException
doSetNextReader
in class SimpleCollector
IOException
public boolean needsScores()
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.