Fork me on GitHub
  • API

    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
    object
    MultiTermQuery.RewriteMethod
    SpanRewriteMethod
    SpanMultiTermQueryWrapper<Q>.TopTermsSpanBooleanQueryRewrite
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Search.Spans
    Assembly: Lucene.Net.dll
    Syntax
    public sealed class SpanMultiTermQueryWrapper<Q>.TopTermsSpanBooleanQueryRewrite : SpanRewriteMethod

    Constructors

    TopTermsSpanBooleanQueryRewrite(int)

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

    Declaration
    public TopTermsSpanBooleanQueryRewrite(int size)
    Parameters
    Type Name Description
    int size
    See Also
    MultiTermRewriteMethod

    Properties

    Count

    return the maximum priority queue size.

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

    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)
    See Also
    MultiTermRewriteMethod

    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()
    See Also
    MultiTermRewriteMethod

    Rewrite(IndexReader, MultiTermQuery)

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

    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.