Show / Hide Table of Contents

    Class AbstractAllGroupsCollector<TGroupValue>

    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.

    This is an abstract version. Concrete implementations define what a group actually is and how it is internally collected.

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk
    Inheritance
    System.Object
    AbstractAllGroupsCollector<TGroupValue>
    FunctionAllGroupsCollector
    TermAllGroupsCollector
    Implements
    IAbstractAllGroupsCollector<TGroupValue>
    ICollector
    Namespace: Lucene.Net.Search.Grouping
    Assembly: Lucene.Net.Grouping.dll
    Syntax
    public abstract class AbstractAllGroupsCollector<TGroupValue> : object, IAbstractAllGroupsCollector<TGroupValue>, ICollector
    Type Parameters
    Name Description
    TGroupValue

    Properties

    | Improve this Doc View Source

    AcceptsDocsOutOfOrder

    Declaration
    public virtual bool AcceptsDocsOutOfOrder { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    GroupCount

    Returns the total number of groups for the executed search. This is a convenience method. The following code snippet has the same effect:

    GetGroups().Count

    Declaration
    public virtual int GroupCount { get; }
    Property Value
    Type Description
    System.Int32

    The total number of groups for the executed search

    | Improve this Doc View Source

    Groups

    Returns the group values

    This is an unordered collections of group values. For each group that matched the query there is a BytesRef representing a group value.

    Declaration
    public abstract IEnumerable<TGroupValue> Groups { get; }
    Property Value
    Type Description
    IEnumerable<TGroupValue>

    the group values

    Methods

    | Improve this Doc View Source

    Collect(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 or on every hit. Doing so can slow searches by an order of magnitude or more.

    Declaration
    public abstract void Collect(int doc)
    Parameters
    Type Name Description
    System.Int32 doc
    | Improve this Doc View Source

    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

    | Improve this Doc View Source

    SetScorer(Scorer)

    Declaration
    public virtual void SetScorer(Scorer scorer)
    Parameters
    Type Name Description
    Scorer scorer

    Implements

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