Class TermAllGroupsCollector
A collector that collects all groups that match the query. Only the group value is collected, and the order is undefined. This collector does not determine the most relevant document of a group.
Implementation detail: an int hash set (SentinelIntSet) is used to detect if a group is already added to the total count. For each segment the int set is cleared and filled with previous counted groups that occur in the new segment.
Inherited Members
Namespace: Lucene.Net.Search.Grouping.Terms
Assembly: Lucene.Net.Grouping.dll
Syntax
public class TermAllGroupsCollector : AbstractAllGroupsCollector<BytesRef>, IAbstractAllGroupsCollector<BytesRef>, ICollector
Constructors
| Improve this Doc View SourceTermAllGroupsCollector(String)
Constructs a AbstractAllGroupsCollector<TGroupValue>. This sets the initial allocation size for the internal int set and group list to 128.
Declaration
public TermAllGroupsCollector(string groupField)
Parameters
Type | Name | Description |
---|---|---|
System.String | groupField | The field to group by |
TermAllGroupsCollector(String, Int32)
Expert: Constructs a AbstractAllGroupsCollector<TGroupValue>
Declaration
public TermAllGroupsCollector(string groupField, int initialSize)
Parameters
Type | Name | Description |
---|---|---|
System.String | groupField | The field to group by |
System.Int32 | initialSize | The initial allocation size of the internal int set and group list which should roughly match the total number of expected unique groups. Be aware that the heap usage is 4 bytes * initialSize. |
Properties
| Improve this Doc View SourceGroups
Declaration
public override IEnumerable<BytesRef> Groups { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<BytesRef> |
Overrides
Methods
| Improve this Doc View SourceCollect(Int32)
Declaration
public override void Collect(int doc)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | doc |
Overrides
SetNextReader(AtomicReaderContext)
Declaration
public override void SetNextReader(AtomicReaderContext context)
Parameters
Type | Name | Description |
---|---|---|
AtomicReaderContext | context |