Show / Hide Table of Contents

    Class MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite

    A rewrite method that first translates each term into SHOULD clause in a BooleanQuery, but the scores are only computed as the boost.

    This rewrite method only uses the top scoring terms so it will not overflow the boolean max clause count.

    Inheritance
    System.Object
    MultiTermQuery.RewriteMethod
    TermCollectingRewrite<BooleanQuery>
    TopTermsRewrite<BooleanQuery>
    MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite
    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 TopTermsBoostOnlyBooleanQueryRewrite : TopTermsRewrite<BooleanQuery>, ITopTermsRewrite

    Constructors

    | Improve this Doc View Source

    TopTermsBoostOnlyBooleanQueryRewrite(Int32)

    Create a MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite for at most size terms.

    NOTE: if MaxClauseCount is smaller than size, then it will be used instead.

    Declaration
    public TopTermsBoostOnlyBooleanQueryRewrite(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 docFreq, float boost, TermContext states)
    Parameters
    Type Name Description
    BooleanQuery topLevel
    Term term
    System.Int32 docFreq
    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)