Show / Hide Table of Contents

    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.

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk
    Inheritance
    System.Object
    AbstractAllGroupsCollector<BytesRef>
    TermAllGroupsCollector
    Implements
    IAbstractAllGroupsCollector<BytesRef>
    ICollector
    Inherited Members
    AbstractAllGroupsCollector<BytesRef>.GroupCount
    AbstractAllGroupsCollector<BytesRef>.SetScorer(Scorer)
    AbstractAllGroupsCollector<BytesRef>.AcceptsDocsOutOfOrder
    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 Source

    TermAllGroupsCollector(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

    | Improve this Doc View Source

    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 Source

    Groups

    Declaration
    public override IEnumerable<BytesRef> Groups { get; }
    Property Value
    Type Description
    IEnumerable<BytesRef>
    Overrides
    Lucene.Net.Search.Grouping.AbstractAllGroupsCollector<Lucene.Net.Util.BytesRef>.Groups

    Methods

    | Improve this Doc View Source

    Collect(Int32)

    Declaration
    public override void Collect(int doc)
    Parameters
    Type Name Description
    System.Int32 doc
    Overrides
    Lucene.Net.Search.Grouping.AbstractAllGroupsCollector<Lucene.Net.Util.BytesRef>.Collect(System.Int32)
    | Improve this Doc View Source

    SetNextReader(AtomicReaderContext)

    Declaration
    public override void SetNextReader(AtomicReaderContext context)
    Parameters
    Type Name Description
    AtomicReaderContext context
    Overrides
    Lucene.Net.Search.Grouping.AbstractAllGroupsCollector<Lucene.Net.Util.BytesRef>.SetNextReader(Lucene.Net.Index.AtomicReaderContext)

    Implements

    IAbstractAllGroupsCollector<TGroupValue>
    ICollector
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)