Class FunctionAllGroupHeadsCollector
An implementation of AbstractAllGroupHeadsCollector for retrieving the most relevant groups when grouping by Lucene.Net.Queries.Function.ValueSource.
Note
This API is experimental and might change in incompatible ways in the next release.
Inheritance
Implements
Inherited Members
Namespace: Lucene.Net.Search.Grouping.Function
Assembly: Lucene.Net.Grouping.dll
Syntax
public class FunctionAllGroupHeadsCollector : AbstractAllGroupHeadsCollector<FunctionAllGroupHeadsCollector.GroupHead>, ICollector
Constructors
FunctionAllGroupHeadsCollector(ValueSource, IDictionary, Sort)
Constructs a FunctionAllGroupHeadsCollector instance.
Declaration
public FunctionAllGroupHeadsCollector(ValueSource groupBy, IDictionary vsContext, Sort sortWithinGroup)
Parameters
Type | Name | Description |
---|---|---|
ValueSource | groupBy | The Lucene.Net.Queries.Function.ValueSource to group by |
IDictionary | vsContext | The Lucene.Net.Queries.Function.ValueSource context |
Sort | sortWithinGroup | The sort within a group |
Properties
CollectedGroupHeads
Returns the collected group heads. Subsequent calls should return the same group heads.
Declaration
protected override ICollection<FunctionAllGroupHeadsCollector.GroupHead> CollectedGroupHeads { get; }
Property Value
Type | Description |
---|---|
ICollection<FunctionAllGroupHeadsCollector.GroupHead> | the collected group heads |
Overrides
Methods
RetrieveGroupHeadAndAddIfNotExist(int)
Returns the group head and puts it into AbstractAllGroupHeadsCollector<GH>.TemporalResult. If the group head wasn't encountered before then it will be added to the collected group heads.
The Stop property will be true
if the group head wasn't encountered before
otherwise false
.
Declaration
protected override void RetrieveGroupHeadAndAddIfNotExist(int doc)
Parameters
Type | Name | Description |
---|---|---|
int | doc | The document to retrieve the group head for. |
Overrides
Exceptions
Type | Condition |
---|---|
IOException | If I/O related errors occur |
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 |
Overrides
SetScorer(Scorer)
Called before successive calls to Collect(int). Implementations
that need the score of the current document (passed-in to
Declaration
public override void SetScorer(Scorer scorer)
Parameters
Type | Name | Description |
---|---|---|
Scorer | scorer |