Class AbstractDistinctValuesCollector<GC>
A second pass grouping collector that keeps track of distinct values for a specified field for the top N group.
Inheritance
Namespace: Lucene.Net.Search.Grouping
Assembly: Lucene.Net.Grouping.dll
Syntax
public abstract class AbstractDistinctValuesCollector<GC> : object, IAbstractDistinctValuesCollector<GC>, ICollector where GC : AbstractDistinctValuesCollector.IGroupCount<object>
Type Parameters
Name | Description |
---|---|
GC |
Properties
| Improve this Doc View SourceAcceptsDocsOutOfOrder
Declaration
public virtual bool AcceptsDocsOutOfOrder { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Groups
Returns all unique values for each top N group.
Declaration
public abstract IEnumerable<GC> Groups { get; }
Property Value
Type | Description |
---|---|
IEnumerable<GC> | all unique values for each top N group |
Methods
| Improve this Doc View SourceCollect(Int32)
Called once for every document matching a query, with the unbased document number.
Note: The collection of the current segment can be terminated by throwing a CollectionTerminatedException. In this case, the last docs of the current AtomicReaderContext will be skipped and IndexSearcher will swallow the exception and continue collection with the next leaf.
Note: this is called in an inner search loop. For good search performance,
implementations of this method should not call
Declaration
public abstract void Collect(int doc)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | doc |
SetNextReader(AtomicReaderContext)
Called before collecting from each AtomicReaderContext. All doc ids in Collect(Int32) will correspond to Reader.
Add DocBase to the current Reader's internal document id to re-base ids in Collect(Int32).
Declaration
public abstract void SetNextReader(AtomicReaderContext context)
Parameters
Type | Name | Description |
---|---|---|
AtomicReaderContext | context | next atomic reader context |
SetScorer(Scorer)
Declaration
public virtual void SetScorer(Scorer scorer)
Parameters
Type | Name | Description |
---|---|---|
Scorer | scorer |