public class TermSecondPassGroupingCollector extends AbstractSecondPassGroupingCollector<String>
AbstractSecondPassGroupingCollector
that groups based on
field values and more specifically uses FieldCache.StringIndex
to collect grouped docs.AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE>
groupDocs, groupMap
Constructor and Description |
---|
TermSecondPassGroupingCollector(String groupField,
Collection<SearchGroup<String>> 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 |
---|---|
protected AbstractSecondPassGroupingCollector.SearchGroupDocs<String> |
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) |
acceptsDocsOutOfOrder, collect, getTopGroups, setScorer
public TermSecondPassGroupingCollector(String groupField, Collection<SearchGroup<String>> groups, org.apache.lucene.search.Sort groupSort, org.apache.lucene.search.Sort withinGroupSort, int maxDocsPerGroup, boolean getScores, boolean getMaxScores, boolean fillSortFields) throws IOException
IOException
public void setNextReader(org.apache.lucene.index.IndexReader reader, int docBase) throws IOException
setNextReader
in class AbstractSecondPassGroupingCollector<String>
IOException
protected AbstractSecondPassGroupingCollector.SearchGroupDocs<String> retrieveGroup(int doc) throws IOException
AbstractSecondPassGroupingCollector
null
if no group could be retrieved.retrieveGroup
in class AbstractSecondPassGroupingCollector<String>
doc
- The specified docnull
if no group could be retrievedIOException
- If an I/O related error occurred