public abstract class SecondPassGroupingCollector<T> extends SimpleCollector
See org.apache.lucene.search.grouping for more
details including a full code example.
| Modifier and Type | Class and Description |
|---|---|
class |
SecondPassGroupingCollector.SearchGroupDocs<T> |
| Modifier and Type | Field and Description |
|---|---|
protected SecondPassGroupingCollector.SearchGroupDocs<T>[] |
groupDocs |
protected Map<T,SecondPassGroupingCollector.SearchGroupDocs<T>> |
groupMap |
| Constructor and Description |
|---|
SecondPassGroupingCollector(Collection<SearchGroup<T>> groups,
Sort groupSort,
Sort withinGroupSort,
int maxDocsPerGroup,
boolean getScores,
boolean getMaxScores,
boolean fillSortFields) |
| Modifier and Type | Method and Description |
|---|---|
void |
collect(int doc) |
protected void |
doSetNextReader(LeafReaderContext readerContext) |
TopGroups<T> |
getTopGroups(int withinGroupOffset) |
boolean |
needsScores() |
protected abstract SecondPassGroupingCollector.SearchGroupDocs<T> |
retrieveGroup(int doc)
Returns the group the specified doc belongs to or
null if no group could be retrieved. |
void |
setScorer(Scorer scorer) |
getLeafCollectorprotected final Map<T,SecondPassGroupingCollector.SearchGroupDocs<T>> groupMap
protected SecondPassGroupingCollector.SearchGroupDocs<T>[] groupDocs
public SecondPassGroupingCollector(Collection<SearchGroup<T>> groups, Sort groupSort, Sort withinGroupSort, int maxDocsPerGroup, boolean getScores, boolean getMaxScores, boolean fillSortFields) throws IOException
IOExceptionpublic boolean needsScores()
public void setScorer(Scorer scorer) throws IOException
setScorer in interface LeafCollectorsetScorer in class SimpleCollectorIOExceptionpublic void collect(int doc)
throws IOException
collect in interface LeafCollectorcollect in class SimpleCollectorIOExceptionprotected abstract SecondPassGroupingCollector.SearchGroupDocs<T> 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 occurredprotected void doSetNextReader(LeafReaderContext readerContext) throws IOException
doSetNextReader in class SimpleCollectorIOExceptionCopyright © 2000-2017 Apache Software Foundation. All Rights Reserved.