public abstract class AbstractSecondPassGroupingCollector<GROUP_VALUE_TYPE> extends Collector
See org.apache.lucene.search.grouping
for more
details including a full code example.
Modifier and Type | Class and Description |
---|---|
class |
AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE> |
Modifier and Type | Field and Description |
---|---|
protected AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE>[] |
groupDocs |
protected Map<GROUP_VALUE_TYPE,AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE>> |
groupMap |
Constructor and Description |
---|
AbstractSecondPassGroupingCollector(Collection<SearchGroup<GROUP_VALUE_TYPE>> groups,
Sort groupSort,
Sort withinGroupSort,
int maxDocsPerGroup,
boolean getScores,
boolean getMaxScores,
boolean fillSortFields) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptsDocsOutOfOrder() |
void |
collect(int doc) |
TopGroups<GROUP_VALUE_TYPE> |
getTopGroups(int withinGroupOffset) |
protected abstract AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE> |
retrieveGroup(int doc)
Returns the group the specified doc belongs to or
null if no group could be retrieved. |
void |
setNextReader(AtomicReaderContext readerContext) |
void |
setScorer(Scorer scorer) |
protected final Map<GROUP_VALUE_TYPE,AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE>> groupMap
protected AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE>[] groupDocs
public AbstractSecondPassGroupingCollector(Collection<SearchGroup<GROUP_VALUE_TYPE>> groups, Sort groupSort, Sort withinGroupSort, int maxDocsPerGroup, boolean getScores, boolean getMaxScores, boolean fillSortFields) throws IOException
IOException
public void setScorer(Scorer scorer) throws IOException
setScorer
in class Collector
IOException
public void collect(int doc) throws IOException
collect
in class Collector
IOException
protected abstract AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE> retrieveGroup(int doc) throws IOException
null
if no group could be retrieved.doc
- The specified docnull
if no group could be retrievedIOException
- If an I/O related error occurredpublic void setNextReader(AtomicReaderContext readerContext) throws IOException
setNextReader
in class Collector
IOException
public boolean acceptsDocsOutOfOrder()
acceptsDocsOutOfOrder
in class Collector
public TopGroups<GROUP_VALUE_TYPE> getTopGroups(int withinGroupOffset)
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.