static class TermAllGroupHeadsCollector.GeneralAllGroupHeadsCollector extends TermAllGroupHeadsCollector<TermAllGroupHeadsCollector.GeneralAllGroupHeadsCollector.GroupHead>
| Modifier and Type | Class and Description |
|---|---|
(package private) class |
TermAllGroupHeadsCollector.GeneralAllGroupHeadsCollector.GroupHead |
TermAllGroupHeadsCollector.GeneralAllGroupHeadsCollector, TermAllGroupHeadsCollector.OrdAllGroupHeadsCollector, TermAllGroupHeadsCollector.OrdScoreAllGroupHeadsCollector, TermAllGroupHeadsCollector.ScoreAllGroupHeadsCollectorAbstractAllGroupHeadsCollector.TemporalResult| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<BytesRef,TermAllGroupHeadsCollector.GeneralAllGroupHeadsCollector.GroupHead> |
groups |
(package private) Scorer |
scorer |
private Sort |
sortWithinGroup |
groupField, groupIndex, readerContextcompIDXEnd, reversed, temporalResult| Constructor and Description |
|---|
GeneralAllGroupHeadsCollector(java.lang.String groupField,
Sort sortWithinGroup) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doSetNextReader(LeafReaderContext context)
This method is called before collecting
context. |
protected java.util.Collection<TermAllGroupHeadsCollector.GeneralAllGroupHeadsCollector.GroupHead> |
getCollectedGroupHeads()
Returns the collected group heads.
|
boolean |
needsScores()
Indicates if document scores are needed by this collector.
|
protected void |
retrieveGroupHeadAndAddIfNotExist(int doc)
Returns the group head and puts it into
AbstractAllGroupHeadsCollector.temporalResult. |
void |
setScorer(Scorer scorer)
Called before successive calls to
LeafCollector.collect(int). |
create, createcollect, groupHeadsSize, retrieveGroupHeads, retrieveGroupHeadsgetLeafCollectorprivate final Sort sortWithinGroup
private final java.util.Map<BytesRef,TermAllGroupHeadsCollector.GeneralAllGroupHeadsCollector.GroupHead> groups
Scorer scorer
GeneralAllGroupHeadsCollector(java.lang.String groupField,
Sort sortWithinGroup)
protected void retrieveGroupHeadAndAddIfNotExist(int doc)
throws java.io.IOException
AbstractAllGroupHeadsCollectorAbstractAllGroupHeadsCollector.temporalResult.
If the group head wasn't encountered before then it will be added to the collected group heads.
The AbstractAllGroupHeadsCollector.TemporalResult.stop property will be true if the group head wasn't encountered before
otherwise false.
retrieveGroupHeadAndAddIfNotExist in class AbstractAllGroupHeadsCollector<TermAllGroupHeadsCollector.GeneralAllGroupHeadsCollector.GroupHead>doc - The document to retrieve the group head for.java.io.IOException - If I/O related errors occurprotected java.util.Collection<TermAllGroupHeadsCollector.GeneralAllGroupHeadsCollector.GroupHead> getCollectedGroupHeads()
AbstractAllGroupHeadsCollectorgetCollectedGroupHeads in class AbstractAllGroupHeadsCollector<TermAllGroupHeadsCollector.GeneralAllGroupHeadsCollector.GroupHead>protected void doSetNextReader(LeafReaderContext context) throws java.io.IOException
SimpleCollectorcontext.doSetNextReader in class SimpleCollectorjava.io.IOExceptionpublic boolean needsScores()
Collectortrue if scores are needed.public void setScorer(Scorer scorer) throws java.io.IOException
LeafCollectorLeafCollector.collect(int). Implementations
that need the score of the current document (passed-in to
LeafCollector.collect(int)), should save the passed-in Scorer and call
scorer.score() when needed.setScorer in interface LeafCollectorsetScorer in class SimpleCollectorjava.io.IOException