Show / Hide Table of Contents

    Class AbstractAllGroupHeadsCollector

    LUCENENET specific class used to reference an AbstractAllGroupHeadsCollector<GH> subclass without refering to its generic closing type.

    Inheritance
    System.Object
    AbstractAllGroupHeadsCollector
    AbstractAllGroupHeadsCollector<GH>
    Implements
    ICollector
    Namespace: Lucene.Net.Search.Grouping
    Assembly: Lucene.Net.Grouping.dll
    Syntax
    public abstract class AbstractAllGroupHeadsCollector : object, ICollector

    Properties

    | Improve this Doc View Source

    AcceptsDocsOutOfOrder

    Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collect(Int32).

    Most Lucene Query implementations will visit matching docIDs in order. However, some queries (currently limited to certain cases of BooleanQuery) can achieve faster searching if the ICollector allows them to deliver the docIDs out of order.

    Many collectors don't mind getting docIDs out of order, so it's important to return true here.

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

    GroupHeadsCount

    The number of group heads found for a query. LUCENENET NOTE: This was groupHeadsSize() in Lucene

    Declaration
    public abstract int GroupHeadsCount { get; }
    Property Value
    Type Description
    System.Int32

    the number of group heads found for a query.

    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

    RetrieveGroupHeadAndAddIfNotExist(Int32)

    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 abstract void RetrieveGroupHeadAndAddIfNotExist(int doc)
    Parameters
    Type Name Description
    System.Int32 doc

    The document to retrieve the group head for.

    | Improve this Doc View Source

    RetrieveGroupHeads()

    Declaration
    public abstract int[] RetrieveGroupHeads()
    Returns
    Type Description
    System.Int32[]

    an int array containing all group heads. The size of the array is equal to number of collected unique groups.

    | Improve this Doc View Source

    RetrieveGroupHeads(Int32)

    Declaration
    public abstract FixedBitSet RetrieveGroupHeads(int maxDoc)
    Parameters
    Type Name Description
    System.Int32 maxDoc

    The maxDoc of the top level IndexReader

    Returns
    Type Description
    FixedBitSet

    a FixedBitSet containing all group heads.

    | 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)

    Called before successive calls to Collect(Int32). Implementations that need the score of the current document (passed-in to ), should save the passed-in Scorer and call scorer.Score() when needed.

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

    Implements

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