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
    System.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)
    TermCollectingRewrite<BooleanQuery>.AddClause(BooleanQuery, Term, Int32, Single)
    MultiTermQuery.RewriteMethod.GetTermsEnum(MultiTermQuery, Terms, AttributeSource)
    Namespace: Lucene.Net.Search
    Assembly: Lucene.Net.dll
    Syntax
    public sealed class TopTermsScoringBooleanQueryRewrite : TopTermsRewrite<BooleanQuery>, ITopTermsRewrite

    Constructors

    | Improve this Doc View Source

    TopTermsScoringBooleanQueryRewrite(Int32)

    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
    System.Int32 size

    Properties

    | Improve this Doc View Source

    MaxSize

    Declaration
    protected override int MaxSize { get; }
    Property Value
    Type Description
    System.Int32
    Overrides
    Lucene.Net.Search.TopTermsRewrite<Lucene.Net.Search.BooleanQuery>.MaxSize

    Methods

    | Improve this Doc View Source

    AddClause(BooleanQuery, Term, Int32, Single, TermContext)

    Declaration
    protected override void AddClause(BooleanQuery topLevel, Term term, int docCount, float boost, TermContext states)
    Parameters
    Type Name Description
    BooleanQuery topLevel
    Term term
    System.Int32 docCount
    System.Single boost
    TermContext states
    Overrides
    Lucene.Net.Search.TermCollectingRewrite<Lucene.Net.Search.BooleanQuery>.AddClause(Lucene.Net.Search.BooleanQuery, Lucene.Net.Index.Term, System.Int32, System.Single, Lucene.Net.Index.TermContext)
    | Improve this Doc View Source

    GetTopLevelQuery()

    Declaration
    protected override BooleanQuery GetTopLevelQuery()
    Returns
    Type Description
    BooleanQuery
    Overrides
    Lucene.Net.Search.TermCollectingRewrite<Lucene.Net.Search.BooleanQuery>.GetTopLevelQuery()

    See Also

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