public abstract class AbstractSecondPassGroupingCollector<GROUP_VALUE_TYPE>
extends org.apache.lucene.search.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 java.util.Map<GROUP_VALUE_TYPE,AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE>> |
groupMap |
Constructor and Description |
---|
AbstractSecondPassGroupingCollector(java.util.Collection<SearchGroup<GROUP_VALUE_TYPE>> groups,
org.apache.lucene.search.Sort groupSort,
org.apache.lucene.search.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(org.apache.lucene.index.IndexReader reader,
int docBase) |
void |
setScorer(org.apache.lucene.search.Scorer scorer) |
protected final java.util.Map<GROUP_VALUE_TYPE,AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE>> groupMap
protected AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE>[] groupDocs
public AbstractSecondPassGroupingCollector(java.util.Collection<SearchGroup<GROUP_VALUE_TYPE>> groups, org.apache.lucene.search.Sort groupSort, org.apache.lucene.search.Sort withinGroupSort, int maxDocsPerGroup, boolean getScores, boolean getMaxScores, boolean fillSortFields) throws java.io.IOException
java.io.IOException
public void setScorer(org.apache.lucene.search.Scorer scorer) throws java.io.IOException
setScorer
in class org.apache.lucene.search.Collector
java.io.IOException
public void collect(int doc) throws java.io.IOException
collect
in class org.apache.lucene.search.Collector
java.io.IOException
protected abstract AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE> retrieveGroup(int doc) throws java.io.IOException
null
if no group could be retrieved.doc
- The specified docnull
if no group could be retrievedjava.io.IOException
- If an I/O related error occurredpublic void setNextReader(org.apache.lucene.index.IndexReader reader, int docBase) throws java.io.IOException
setNextReader
in class org.apache.lucene.search.Collector
java.io.IOException
public boolean acceptsDocsOutOfOrder()
acceptsDocsOutOfOrder
in class org.apache.lucene.search.Collector
public TopGroups<GROUP_VALUE_TYPE> getTopGroups(int withinGroupOffset)