Class TermSecondPassGroupingCollector
- java.lang.Object
-
- org.apache.lucene.search.Collector
-
- org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector<String>
-
- org.apache.lucene.search.grouping.TermSecondPassGroupingCollector
-
public class TermSecondPassGroupingCollector extends AbstractSecondPassGroupingCollector<String>
Concrete implementation ofAbstractSecondPassGroupingCollectorthat groups based on field values and more specifically usesFieldCache.StringIndexto collect grouped docs.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector
AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE>
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector
groupDocs, groupMap
-
-
Constructor Summary
Constructors Constructor 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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AbstractSecondPassGroupingCollector.SearchGroupDocs<String>retrieveGroup(int doc)Returns the group the specified doc belongs to ornullif no group could be retrieved.voidsetNextReader(org.apache.lucene.index.IndexReader reader, int docBase)-
Methods inherited from class org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector
acceptsDocsOutOfOrder, collect, getTopGroups, setScorer
-
-
-
-
Constructor Detail
-
TermSecondPassGroupingCollector
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
- Throws:
IOException
-
-
Method Detail
-
setNextReader
public void setNextReader(org.apache.lucene.index.IndexReader reader, int docBase) throws IOException- Overrides:
setNextReaderin classAbstractSecondPassGroupingCollector<String>- Throws:
IOException
-
retrieveGroup
protected AbstractSecondPassGroupingCollector.SearchGroupDocs<String> retrieveGroup(int doc) throws IOException
Description copied from class:AbstractSecondPassGroupingCollectorReturns the group the specified doc belongs to ornullif no group could be retrieved.- Specified by:
retrieveGroupin classAbstractSecondPassGroupingCollector<String>- Parameters:
doc- The specified doc- Returns:
- the group the specified doc belongs to or
nullif no group could be retrieved - Throws:
IOException- If an I/O related error occurred
-
-