org.apache.lucene.search.grouping.dv
Class DVAllGroupHeadsCollector<GH extends AbstractAllGroupHeadsCollector.GroupHead<?>>
java.lang.Object
org.apache.lucene.search.Collector
org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector<GH>
org.apache.lucene.search.grouping.dv.DVAllGroupHeadsCollector<GH>
public abstract class DVAllGroupHeadsCollector<GH extends AbstractAllGroupHeadsCollector.GroupHead<?>>
- extends AbstractAllGroupHeadsCollector<GH>
A base implementation of AbstractAllGroupHeadsCollector
for retrieving
the most relevant groups when grouping on a indexed doc values field.
- 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 extends AbstractAllGroupHeadsCollector.GroupHead<?>> DVAllGroupHeadsCollector<T> create(String groupField,
Sort sortWithinGroup,
DocValues.Type type,
boolean diskResident)
- Creates an
AbstractAllGroupHeadsCollector
instance based on the supplied arguments.
This factory method decides with implementation is best suited.
- Parameters:
groupField
- The field to group bysortWithinGroup
- The sort within each grouptype
- The DocValues.Type
which is used to select a concrete implementation.diskResident
- Whether the values to group by should be disk resident
- Returns:
- an
AbstractAllGroupHeadsCollector
instance based on the supplied arguments
setNextReader
public void setNextReader(AtomicReaderContext readerContext)
throws IOException
- Specified by:
setNextReader
in class Collector
- 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.