public abstract class AbstractAllGroupHeadsCollector<GH extends AbstractAllGroupHeadsCollector.GroupHead> extends SimpleCollector
Modifier and Type | Class and Description |
---|---|
static class |
AbstractAllGroupHeadsCollector.GroupHead<GROUP_VALUE_TYPE>
Represents a group head.
|
protected class |
AbstractAllGroupHeadsCollector.TemporalResult
Contains the result of group head retrieval.
|
Modifier and Type | Field and Description |
---|---|
protected int |
compIDXEnd |
protected int[] |
reversed |
protected AbstractAllGroupHeadsCollector.TemporalResult |
temporalResult |
Modifier | Constructor and Description |
---|---|
protected |
AbstractAllGroupHeadsCollector(int numberOfSorts) |
Modifier and Type | Method and Description |
---|---|
void |
collect(int doc) |
protected abstract Collection<GH> |
getCollectedGroupHeads()
Returns the collected group heads.
|
int |
groupHeadsSize() |
protected abstract void |
retrieveGroupHeadAndAddIfNotExist(int doc)
Returns the group head and puts it into
temporalResult . |
int[] |
retrieveGroupHeads() |
FixedBitSet |
retrieveGroupHeads(int maxDoc) |
doSetNextReader, getLeafCollector, setScorer
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
needsScores
protected final int[] reversed
protected final int compIDXEnd
protected final AbstractAllGroupHeadsCollector.TemporalResult temporalResult
protected AbstractAllGroupHeadsCollector(int numberOfSorts)
public FixedBitSet retrieveGroupHeads(int maxDoc)
maxDoc
- The maxDoc of the top level IndexReader
.FixedBitSet
containing all group heads.public int[] retrieveGroupHeads()
public int groupHeadsSize()
protected abstract void retrieveGroupHeadAndAddIfNotExist(int doc) throws IOException
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
.
doc
- The document to retrieve the group head for.IOException
- If I/O related errors occurprotected abstract Collection<GH> getCollectedGroupHeads()
public void collect(int doc) throws IOException
collect
in interface LeafCollector
collect
in class SimpleCollector
IOException
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.