org.apache.lucene.search.grouping.dv
Class DVSecondPassGroupingCollector<GROUP_VALUE>
java.lang.Object
org.apache.lucene.search.Collector
org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector<GROUP_VALUE>
org.apache.lucene.search.grouping.dv.DVSecondPassGroupingCollector<GROUP_VALUE>
public abstract class DVSecondPassGroupingCollector<GROUP_VALUE>
- extends AbstractSecondPassGroupingCollector<GROUP_VALUE>
IDV based implementation of AbstractSecondPassGroupingCollector.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
|
Method Summary |
static
|
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)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
create
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
- Constructs a
DVSecondPassGroupingCollector.
Selects and constructs the most optimal second pass collector implementation for grouping by DocValues.
- Parameters:
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 values
- Returns:
- the most optimal second pass collector implementation for grouping by
DocValues
- Throws:
IOException - If I/O related errors occur
setNextReader
public void setNextReader(AtomicReaderContext readerContext)
throws IOException
- Overrides:
setNextReader in class AbstractSecondPassGroupingCollector<GROUP_VALUE>
- Throws:
IOException
setDocValuesSources
protected abstract void setDocValuesSources(DocValues.Source source,
AtomicReaderContext readerContext)
- Sets the idv source for concrete implementations to use.
- Parameters:
source - The idv source to be used by concrete implementationsreaderContext - The current reader context
getDefaultSource
protected DocValues.Source getDefaultSource(AtomicReaderContext readerContext)
- Parameters:
readerContext - The current reader context
- Returns:
- The default source when no doc values are available.
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.