Class FunctionSecondPassGroupingCollector<TMutableValue>
Concrete implementation of AbstractSecondPassGroupingCollector<TGroupValue> that groups based on Lucene.Net.Queries.Function.ValueSource instances.
Note
This API is experimental and might change in incompatible ways in the next release.
Inheritance
Inherited Members
Namespace: Lucene.Net.Search.Grouping.Function
Assembly: Lucene.Net.Grouping.dll
Syntax
public class FunctionSecondPassGroupingCollector<TMutableValue> : AbstractSecondPassGroupingCollector<TMutableValue>, IAbstractSecondPassGroupingCollector<TMutableValue>, ICollector where TMutableValue : MutableValue
Type Parameters
Name | Description |
---|---|
TMutableValue |
Constructors
FunctionSecondPassGroupingCollector(IEnumerable<ISearchGroup<TMutableValue>>, Sort, Sort, int, bool, bool, bool, ValueSource, IDictionary)
Constructs a FunctionSecondPassGroupingCollector<TMutableValue> instance.
Declaration
public FunctionSecondPassGroupingCollector(IEnumerable<ISearchGroup<TMutableValue>> searchGroups, Sort groupSort, Sort withinGroupSort, int maxDocsPerGroup, bool getScores, bool getMaxScores, bool fillSortFields, ValueSource groupByVS, IDictionary vsContext)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<ISearchGroup<TMutableValue>> | searchGroups | The SearchGroup<TGroupValue> instances collected during the first phase. |
Sort | groupSort | The group sort |
Sort | withinGroupSort | The sort inside a group |
int | maxDocsPerGroup | The maximum number of documents to collect inside a group |
bool | getScores | Whether to include the scores |
bool | getMaxScores | Whether to include the maximum score |
bool | fillSortFields | Whether to fill the sort values in WithinGroupSort |
ValueSource | groupByVS | The Lucene.Net.Queries.Function.ValueSource to group by |
IDictionary | vsContext | The value source context |
Exceptions
Type | Condition |
---|---|
IOException | When I/O related errors occur |
Methods
RetrieveGroup(int)
Returns the group the specified doc belongs to or null
if no group could be retrieved.
Declaration
protected override AbstractSecondPassGroupingCollector.SearchGroupDocs<TMutableValue> RetrieveGroup(int doc)
Parameters
Type | Name | Description |
---|---|---|
int | doc | The specified doc |
Returns
Type | Description |
---|---|
AbstractSecondPassGroupingCollector.SearchGroupDocs<TMutableValue> | 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 |