|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.lucene.search.Collector
org.apache.lucene.search.grouping.AbstractAllGroupsCollector<GROUP_VALUE_TYPE>
org.apache.lucene.search.grouping.dv.DVAllGroupsCollector<GROUP_VALUE_TYPE>
public abstract class DVAllGroupsCollector<GROUP_VALUE_TYPE>
Implementation of AbstractAllGroupsCollector that groups documents based on
DocValues fields.
| Method Summary | ||
|---|---|---|
static
|
create(String groupField,
DocValues.Type type,
boolean diskResident)
Constructs a DVAllGroupsCollector. |
|
static
|
create(String groupField,
DocValues.Type type,
boolean diskResident,
int initialSize)
Expert: Constructs a DVAllGroupsCollector. |
|
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 org.apache.lucene.search.grouping.AbstractAllGroupsCollector |
|---|
acceptsDocsOutOfOrder, getGroupCount, getGroups, setScorer |
| Methods inherited from class org.apache.lucene.search.Collector |
|---|
collect |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T> DVAllGroupsCollector<T> create(String groupField,
DocValues.Type type,
boolean diskResident,
int initialSize)
DVAllGroupsCollector.
Selects and constructs the most optimal all groups collector implementation for grouping by DocValues.
groupField - The field to group bytype - The DocValues.Type which is used to select a concrete implementation.diskResident - Whether the values to group by should be disk residentinitialSize - 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. Not all concrete implementions use this!
DocValues
public static <T> DVAllGroupsCollector<T> create(String groupField,
DocValues.Type type,
boolean diskResident)
DVAllGroupsCollector.
Selects and constructs the most optimal all groups collector implementation for grouping by DocValues.
If implementations require an initial allocation size then this will be set to 128.
groupField - The field to group bytype - The DocValues.Type which is used to select a concrete implementation.diskResident - Wether the values to group by should be disk resident
DocValues
public void setNextReader(AtomicReaderContext readerContext)
throws IOException
setNextReader in class CollectorIOException
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 context
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||