Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class MultiTermQuery.TopTermsScoringBooleanQueryRewrite

    A rewrite method that first translates each term into SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.

    This rewrite method only uses the top scoring terms so it will not overflow the boolean max clause count. It is the default rewrite method for FuzzyQuery.
    Inheritance
    object
    MultiTermQuery.RewriteMethod
    TermCollectingRewrite<BooleanQuery>
    TopTermsRewrite<BooleanQuery>
    MultiTermQuery.TopTermsScoringBooleanQueryRewrite
    Inherited Members
    TopTermsRewrite<BooleanQuery>.Count
    TopTermsRewrite<BooleanQuery>.Rewrite(IndexReader, MultiTermQuery)
    TopTermsRewrite<BooleanQuery>.GetHashCode()
    TopTermsRewrite<BooleanQuery>.Equals(object)
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Search
    Assembly: Lucene.Net.dll
    Syntax
    public sealed class MultiTermQuery.TopTermsScoringBooleanQueryRewrite : TopTermsRewrite<BooleanQuery>

    Constructors

    TopTermsScoringBooleanQueryRewrite(int)

    Create a MultiTermQuery.TopTermsScoringBooleanQueryRewrite for at most size terms.

    NOTE: if MaxClauseCount is smaller than size, then it will be used instead.
    Declaration
    public TopTermsScoringBooleanQueryRewrite(int size)
    Parameters
    Type Name Description
    int size
    See Also
    MultiTermRewriteMethod

    Properties

    MaxSize

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

    Declaration
    protected override int MaxSize { get; }
    Property Value
    Type Description
    int
    Overrides
    TopTermsRewrite<BooleanQuery>.MaxSize
    See Also
    MultiTermRewriteMethod

    Methods

    AddClause(BooleanQuery, Term, int, float, TermContext)

    A rewrite method that first translates each term into SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.

    This rewrite method only uses the top scoring terms so it will not overflow the boolean max clause count. It is the default rewrite method for FuzzyQuery.
    Declaration
    protected override void AddClause(BooleanQuery topLevel, Term term, int docCount, float boost, TermContext states)
    Parameters
    Type Name Description
    BooleanQuery topLevel
    Term term
    int docCount
    float boost
    TermContext states
    Overrides
    TermCollectingRewrite<BooleanQuery>.AddClause(BooleanQuery, Term, int, float, TermContext)
    See Also
    MultiTermRewriteMethod

    GetTopLevelQuery()

    Return a suitable top-level Query for holding all expanded terms.

    Declaration
    protected override BooleanQuery GetTopLevelQuery()
    Returns
    Type Description
    BooleanQuery
    Overrides
    TermCollectingRewrite<BooleanQuery>.GetTopLevelQuery()
    See Also
    MultiTermRewriteMethod

    See Also

    MultiTermRewriteMethod
    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.