org.apache.lucene.search.grouping.dv
Class DVFirstPassGroupingCollector<GROUP_VALUE_TYPE>
java.lang.Object
org.apache.lucene.search.Collector
org.apache.lucene.search.grouping.AbstractFirstPassGroupingCollector<GROUP_VALUE_TYPE>
org.apache.lucene.search.grouping.dv.DVFirstPassGroupingCollector<GROUP_VALUE_TYPE>
public abstract class DVFirstPassGroupingCollector<GROUP_VALUE_TYPE>
- extends AbstractFirstPassGroupingCollector<GROUP_VALUE_TYPE>
IDV based Implementations of AbstractFirstPassGroupingCollector.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
create
public static <T> DVFirstPassGroupingCollector<T> create(Sort groupSort,
int topNGroups,
String groupField,
DocValues.Type type,
boolean diskResident)
throws IOException
- Constructs a
DVFirstPassGroupingCollector.
Selects and constructs the most optimal first pass collector implementation for grouping by DocValues.
- Parameters:
groupField - The field to group bytopNGroups - The maximum top number of groups to return. Typically this equals to offset + rows.diskResident - Whether the values to group by should be disk residenttype - The DocValues.Type which is used to select a concrete implementation.groupSort - The sort used for the groups
- Returns:
- the most optimal first 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 AbstractFirstPassGroupingCollector<GROUP_VALUE_TYPE>
- Throws:
IOException
setDocValuesSources
protected abstract void setDocValuesSources(DocValues.Source source)
- Sets the idv source for concrete implementations to use.
- Parameters:
source - The idv source to be used by concrete implementations
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.