Show / Hide Table of Contents

    Class SpanMultiTermQueryWrapper<Q>.TopTermsSpanBooleanQueryRewrite

    A rewrite method that first translates each term into a SpanTermQuery in a 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.

    Inheritance
    System.Object
    MultiTermQuery.RewriteMethod
    SpanRewriteMethod
    SpanMultiTermQueryWrapper<Q>.TopTermsSpanBooleanQueryRewrite
    Inherited Members
    MultiTermQuery.RewriteMethod.GetTermsEnum(MultiTermQuery, Terms, AttributeSource)
    Namespace: Lucene.Net.Search.Spans
    Assembly: Lucene.Net.dll
    Syntax
    public sealed class TopTermsSpanBooleanQueryRewrite : SpanRewriteMethod

    Constructors

    | Improve this Doc View Source

    TopTermsSpanBooleanQueryRewrite(Int32)

    Create a SpanMultiTermQueryWrapper<Q>.TopTermsSpanBooleanQueryRewrite for at most size terms.

    Declaration
    public TopTermsSpanBooleanQueryRewrite(int size)
    Parameters
    Type Name Description
    System.Int32 size

    Properties

    | Improve this Doc View Source

    Count

    return the maximum priority queue size.

    NOTE: This was size() in Lucene.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    System.Int32

    Methods

    | Improve this Doc View Source

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    Rewrite(IndexReader, MultiTermQuery)

    Declaration
    public override Query Rewrite(IndexReader reader, MultiTermQuery query)
    Parameters
    Type Name Description
    IndexReader reader
    MultiTermQuery query
    Returns
    Type Description
    Query
    Overrides
    SpanRewriteMethod.Rewrite(IndexReader, MultiTermQuery)

    See Also

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