public class TermSecondPassGroupingCollector extends AbstractSecondPassGroupingCollector<BytesRef>
AbstractSecondPassGroupingCollector
that groups based on
field values and more specifically uses SortedDocValues
to collect grouped docs.AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE>
groupDocs, groupMap
Constructor and Description |
---|
TermSecondPassGroupingCollector(String groupField,
Collection<SearchGroup<BytesRef>> groups,
Sort groupSort,
Sort withinGroupSort,
int maxDocsPerGroup,
boolean getScores,
boolean getMaxScores,
boolean fillSortFields) |
Modifier and Type | Method and Description |
---|---|
protected void |
doSetNextReader(LeafReaderContext readerContext) |
boolean |
needsScores() |
protected AbstractSecondPassGroupingCollector.SearchGroupDocs<BytesRef> |
retrieveGroup(int doc)
Returns the group the specified doc belongs to or
null if no group could be retrieved. |
collect, getTopGroups, setScorer
getLeafCollector
public TermSecondPassGroupingCollector(String groupField, Collection<SearchGroup<BytesRef>> groups, Sort groupSort, Sort withinGroupSort, int maxDocsPerGroup, boolean getScores, boolean getMaxScores, boolean fillSortFields) throws IOException
IOException
protected void doSetNextReader(LeafReaderContext readerContext) throws IOException
doSetNextReader
in class AbstractSecondPassGroupingCollector<BytesRef>
IOException
protected AbstractSecondPassGroupingCollector.SearchGroupDocs<BytesRef> retrieveGroup(int doc) throws IOException
AbstractSecondPassGroupingCollector
null
if no group could be retrieved.retrieveGroup
in class AbstractSecondPassGroupingCollector<BytesRef>
doc
- The specified docnull
if no group could be retrievedIOException
- If an I/O related error occurredpublic boolean needsScores()
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.