Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class TopTermsRewrite<Q>

    Base rewrite method for collecting only the top terms via a priority queue.

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    - Only public to be accessible by spans package.
    Inheritance
    object
    MultiTermQuery.RewriteMethod
    TermCollectingRewrite<Q>
    TopTermsRewrite<Q>
    MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite
    MultiTermQuery.TopTermsScoringBooleanQueryRewrite
    Inherited Members
    TermCollectingRewrite<Q>.GetTopLevelQuery()
    TermCollectingRewrite<Q>.AddClause(Q, Term, int, float)
    TermCollectingRewrite<Q>.AddClause(Q, Term, int, float, TermContext)
    MultiTermQuery.RewriteMethod.GetTermsEnum(MultiTermQuery, Terms, AttributeSource)
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Search
    Assembly: Lucene.Net.dll
    Syntax
    public abstract class TopTermsRewrite<Q> : TermCollectingRewrite<Q> where Q : Query
    Type Parameters
    Name Description
    Q

    Constructors

    TopTermsRewrite(int)

    Create a TopTermsRewrite<Q> for at most count terms.

    NOTE: if MaxClauseCount is smaller than count, then it will be used instead.
    Declaration
    protected TopTermsRewrite(int count)
    Parameters
    Type Name Description
    int count

    Properties

    Count

    Return the maximum priority queue size.

    NOTE: This was size() in Lucene.
    Declaration
    public virtual int Count { get; }
    Property Value
    Type Description
    int

    MaxSize

    Return the maximum size of the priority queue (for boolean rewrites this is MaxClauseCount).

    Declaration
    protected abstract int MaxSize { get; }
    Property Value
    Type Description
    int

    Methods

    Equals(object)

    Determines whether the specified object is equal to the current object.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with the current object.

    Returns
    Type Description
    bool

    true if the specified object is equal to the current object; otherwise, false.

    Overrides
    object.Equals(object)

    GetHashCode()

    Serves as the default hash function.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for the current object.

    Overrides
    object.GetHashCode()

    Rewrite(IndexReader, MultiTermQuery)

    Base rewrite method for collecting only the top terms via a priority queue.

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    - Only public to be accessible by spans package.
    Declaration
    public override Query Rewrite(IndexReader reader, MultiTermQuery query)
    Parameters
    Type Name Description
    IndexReader reader
    MultiTermQuery query
    Returns
    Type Description
    Query
    Overrides
    MultiTermQuery.RewriteMethod.Rewrite(IndexReader, MultiTermQuery)
    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.