public abstract class DVSecondPassGroupingCollector<GROUP_VALUE> extends AbstractSecondPassGroupingCollector<GROUP_VALUE>
AbstractSecondPassGroupingCollector
.AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE>
groupDocs, groupMap
Modifier and Type | Method and Description |
---|---|
static <T> DVSecondPassGroupingCollector<T> |
create(String groupField,
boolean diskResident,
DocValues.Type type,
Collection<SearchGroup<T>> searchGroups,
Sort groupSort,
Sort withinGroupSort,
int maxDocsPerGroup,
boolean getScores,
boolean getMaxScores,
boolean fillSortFields)
Constructs a
DVSecondPassGroupingCollector . |
protected DocValues.Source |
getDefaultSource(AtomicReaderContext readerContext) |
protected abstract void |
setDocValuesSources(DocValues.Source source,
AtomicReaderContext readerContext)
Sets the idv source for concrete implementations to use.
|
void |
setNextReader(AtomicReaderContext readerContext) |
acceptsDocsOutOfOrder, collect, getTopGroups, retrieveGroup, setScorer
public static <T> DVSecondPassGroupingCollector<T> create(String groupField, boolean diskResident, DocValues.Type type, Collection<SearchGroup<T>> searchGroups, Sort groupSort, Sort withinGroupSort, int maxDocsPerGroup, boolean getScores, boolean getMaxScores, boolean fillSortFields) throws IOException
DVSecondPassGroupingCollector
.
Selects and constructs the most optimal second pass collector implementation for grouping by DocValues
.groupField
- The field to group bydiskResident
- Whether the values to group by should be disk residenttype
- The DocValues.Type
which is used to select a concrete implementation.searchGroups
- The groups from the first phase searchgroupSort
- The sort used for the groupswithinGroupSort
- The sort used for documents inside a groupmaxDocsPerGroup
- The maximum number of documents to collect per groupgetScores
- Whether to include scores for the documents inside a groupgetMaxScores
- Whether to keep track of the higest score per groupfillSortFields
- Whether to include the sort valuesDocValues
IOException
- If I/O related errors occurpublic void setNextReader(AtomicReaderContext readerContext) throws IOException
setNextReader
in class AbstractSecondPassGroupingCollector<GROUP_VALUE>
IOException
protected abstract void setDocValuesSources(DocValues.Source source, AtomicReaderContext readerContext)
source
- The idv source to be used by concrete implementationsreaderContext
- The current reader contextprotected DocValues.Source getDefaultSource(AtomicReaderContext readerContext)
readerContext
- The current reader contextCopyright © 2000-2013 Apache Software Foundation. All Rights Reserved.