Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class FunctionFirstPassGroupingCollector<TMutableValue>

    Concrete implementation of AbstractFirstPassGroupingCollector<TGroupValue> that groups based on Lucene.Net.Queries.Function.ValueSource instances.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Inheritance
    object
    AbstractFirstPassGroupingCollector<TMutableValue>
    FunctionFirstPassGroupingCollector<TMutableValue>
    Implements
    IAbstractFirstPassGroupingCollector<TMutableValue>
    ICollector
    Inherited Members
    AbstractFirstPassGroupingCollector<TMutableValue>.m_orderedGroups
    AbstractFirstPassGroupingCollector<TMutableValue>.GetTopGroups(int, bool)
    AbstractFirstPassGroupingCollector<TMutableValue>.SetScorer(Scorer)
    AbstractFirstPassGroupingCollector<TMutableValue>.Collect(int)
    AbstractFirstPassGroupingCollector<TMutableValue>.AcceptsDocsOutOfOrder
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Search.Grouping.Function
    Assembly: Lucene.Net.Grouping.dll
    Syntax
    public class FunctionFirstPassGroupingCollector<TMutableValue> : AbstractFirstPassGroupingCollector<TMutableValue>, IAbstractFirstPassGroupingCollector<TMutableValue>, ICollector where TMutableValue : MutableValue
    Type Parameters
    Name Description
    TMutableValue

    Constructors

    FunctionFirstPassGroupingCollector(ValueSource, IDictionary, Sort, int)

    Creates a first pass collector.

    Declaration
    public FunctionFirstPassGroupingCollector(ValueSource groupByVS, IDictionary vsContext, Sort groupSort, int topNGroups)
    Parameters
    Type Name Description
    ValueSource groupByVS

    The Lucene.Net.Queries.Function.ValueSource instance to group by

    IDictionary vsContext

    The Lucene.Net.Queries.Function.ValueSource context

    Sort groupSort

    The Lucene.Net.Search.Sort used to sort the groups. The top sorted document within each group according to groupSort, determines how that group sorts against other groups. This must be non-null, ie, if you want to groupSort by relevance use Lucene.Net.Search.Sort.RELEVANCE.

    int topNGroups

    How many top groups to keep.

    Exceptions
    Type Condition
    IOException

    When I/O related errors occur

    Methods

    CopyDocGroupValue(TMutableValue, TMutableValue)

    Returns a copy of the specified group value by creating a new instance and copying the value from the specified groupValue in the new instance. Or optionally the reuse argument can be used to copy the group value in.

    Declaration
    protected override TMutableValue CopyDocGroupValue(TMutableValue groupValue, TMutableValue reuse)
    Parameters
    Type Name Description
    TMutableValue groupValue

    The group value to copy

    TMutableValue reuse

    Optionally a reuse instance to prevent a new instance creation

    Returns
    Type Description
    TMutableValue

    a copy of the specified group value

    Overrides
    AbstractFirstPassGroupingCollector<TMutableValue>.CopyDocGroupValue(TMutableValue, TMutableValue)

    GetDocGroupValue(int)

    Returns the group value for the specified doc.

    Declaration
    protected override TMutableValue GetDocGroupValue(int doc)
    Parameters
    Type Name Description
    int doc

    The specified doc

    Returns
    Type Description
    TMutableValue

    the group value for the specified doc

    Overrides
    AbstractFirstPassGroupingCollector<TMutableValue>.GetDocGroupValue(int)

    SetNextReader(AtomicReaderContext)

    Called before collecting from each Lucene.Net.Index.AtomicReaderContext. All doc ids in Collect(int) will correspond to Lucene.Net.Index.IndexReaderContext.Reader.

    Add Lucene.Net.Index.AtomicReaderContext.DocBase to the current Lucene.Net.Index.IndexReaderContext.Reader's internal document id to re-base ids in Collect(int).
    Declaration
    public override void SetNextReader(AtomicReaderContext context)
    Parameters
    Type Name Description
    AtomicReaderContext context

    next atomic reader context

    Overrides
    AbstractFirstPassGroupingCollector<TMutableValue>.SetNextReader(AtomicReaderContext)

    Implements

    IAbstractFirstPassGroupingCollector<TGroupValue>
    Lucene.Net.Search.ICollector
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.