public abstract class TermAllGroupHeadsCollector<GH extends AbstractAllGroupHeadsCollector.GroupHead<?>> extends AbstractAllGroupHeadsCollector<GH>
AbstractAllGroupHeadsCollector for retrieving the most relevant groups when grouping
on a string based group field. More specifically this all concrete implementations of this base implementation
use SortedDocValues.| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
TermAllGroupHeadsCollector.GeneralAllGroupHeadsCollector |
(package private) static class |
TermAllGroupHeadsCollector.OrdAllGroupHeadsCollector |
(package private) static class |
TermAllGroupHeadsCollector.OrdScoreAllGroupHeadsCollector |
(package private) static class |
TermAllGroupHeadsCollector.ScoreAllGroupHeadsCollector |
AbstractAllGroupHeadsCollector.GroupHead<GROUP_VALUE_TYPE>, AbstractAllGroupHeadsCollector.TemporalResult| Modifier and Type | Field and Description |
|---|---|
private static int |
DEFAULT_INITIAL_SIZE |
(package private) java.lang.String |
groupField |
(package private) SortedDocValues |
groupIndex |
(package private) LeafReaderContext |
readerContext |
compIDXEnd, reversed, temporalResult| Modifier | Constructor and Description |
|---|---|
protected |
TermAllGroupHeadsCollector(java.lang.String groupField,
int numberOfSorts) |
| Modifier and Type | Method and Description |
|---|---|
static AbstractAllGroupHeadsCollector<?> |
create(java.lang.String groupField,
Sort sortWithinGroup)
Creates an
AbstractAllGroupHeadsCollector instance based on the supplied arguments. |
static AbstractAllGroupHeadsCollector<?> |
create(java.lang.String groupField,
Sort sortWithinGroup,
int initialSize)
Creates an
AbstractAllGroupHeadsCollector instance based on the supplied arguments. |
private static boolean |
needGeneralImpl(SortField sortField) |
collect, getCollectedGroupHeads, groupHeadsSize, retrieveGroupHeadAndAddIfNotExist, retrieveGroupHeads, retrieveGroupHeadsdoSetNextReader, getLeafCollector, setScorerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitneedsScoresprivate static final int DEFAULT_INITIAL_SIZE
final java.lang.String groupField
SortedDocValues groupIndex
LeafReaderContext readerContext
protected TermAllGroupHeadsCollector(java.lang.String groupField,
int numberOfSorts)
public static AbstractAllGroupHeadsCollector<?> create(java.lang.String groupField, Sort sortWithinGroup)
AbstractAllGroupHeadsCollector instance based on the supplied arguments.
This factory method decides with implementation is best suited.
Delegates to create(String, org.apache.lucene.search.Sort, int) with an initialSize of 128.groupField - The field to group bysortWithinGroup - The sort within each groupAbstractAllGroupHeadsCollector instance based on the supplied argumentspublic static AbstractAllGroupHeadsCollector<?> create(java.lang.String groupField, Sort sortWithinGroup, int initialSize)
AbstractAllGroupHeadsCollector instance based on the supplied arguments.
This factory method decides with implementation is best suited.groupField - The field to group bysortWithinGroup - The sort within each groupinitialSize - The initial allocation size of the internal int set and group list which should roughly match
the total number of expected unique groups. Be aware that the heap usage is
4 bytes * initialSize.AbstractAllGroupHeadsCollector instance based on the supplied argumentsprivate static boolean needGeneralImpl(SortField sortField)