Class TermSecondPassGroupingCollector
Concrete implementation of AbstractSecondPassGroupingCollector<TGroupValue> that groups based on field values and more specifically uses Lucene.Net.Index.SortedDocValues to collect grouped docs.
Note
This API is experimental and might change in incompatible ways in the next release.
Inherited Members
Namespace: Lucene.Net.Search.Grouping.Terms
Assembly: Lucene.Net.Grouping.dll
Syntax
public class TermSecondPassGroupingCollector : AbstractSecondPassGroupingCollector<BytesRef>, IAbstractSecondPassGroupingCollector<BytesRef>, ICollector
Constructors
TermSecondPassGroupingCollector(string, IEnumerable<ISearchGroup<BytesRef>>, Sort, Sort, int, bool, bool, bool)
Concrete implementation of AbstractSecondPassGroupingCollector<TGroupValue> that groups based on field values and more specifically uses Lucene.Net.Index.SortedDocValues to collect grouped docs.
Note
This API is experimental and might change in incompatible ways in the next release.
Declaration
public TermSecondPassGroupingCollector(string groupField, IEnumerable<ISearchGroup<BytesRef>> groups, Sort groupSort, Sort withinGroupSort, int maxDocsPerGroup, bool getScores, bool getMaxScores, bool fillSortFields)
Parameters
Type | Name | Description |
---|---|---|
string | groupField | |
IEnumerable<ISearchGroup<BytesRef>> | groups | |
Sort | groupSort | |
Sort | withinGroupSort | |
int | maxDocsPerGroup | |
bool | getScores | |
bool | getMaxScores | |
bool | fillSortFields |
Methods
RetrieveGroup(int)
Returns the group the specified doc belongs to or null
if no group could be retrieved.
Declaration
protected override AbstractSecondPassGroupingCollector.SearchGroupDocs<BytesRef> RetrieveGroup(int doc)
Parameters
Type | Name | Description |
---|---|---|
int | doc | The specified doc |
Returns
Type | Description |
---|---|
AbstractSecondPassGroupingCollector.SearchGroupDocs<BytesRef> | the group the specified doc belongs to or |
Overrides
Exceptions
Type | Condition |
---|---|
IOException | If an I/O related error occurred |
SetNextReader(AtomicReaderContext)
Called before collecting from each Lucene.Net.Index.AtomicReaderContext. All doc ids in Collect(int) will correspond to Lucene.Net.Index.IndexReaderContext.Reader.
Add Lucene.Net.Index.AtomicReaderContext.DocBase to the current Lucene.Net.Index.IndexReaderContext.Reader's internal document id to re-base ids in Collect(int).Declaration
public override void SetNextReader(AtomicReaderContext context)
Parameters
Type | Name | Description |
---|---|---|
AtomicReaderContext | context | next atomic reader context |