Show / Hide Table of Contents

    Class PayloadNearQuery

    This class is very similar to SpanNearQuery except that it factors in the value of the payloads located at each of the positions where the TermSpans occurs.

    NOTE: In order to take advantage of this with the default scoring implementation (DefaultSimilarity), you must override ScorePayload(Int32, Int32, Int32, BytesRef), which returns 1 by default.

    Payload scores are aggregated using a pluggable PayloadFunction.

    Inheritance
    System.Object
    Query
    SpanQuery
    SpanNearQuery
    PayloadNearQuery
    Inherited Members
    SpanNearQuery.m_clauses
    SpanNearQuery.m_slop
    SpanNearQuery.m_inOrder
    SpanNearQuery.m_field
    SpanNearQuery.GetClauses()
    SpanNearQuery.Slop
    SpanNearQuery.IsInOrder
    SpanNearQuery.Field
    SpanNearQuery.ExtractTerms(ISet<Term>)
    SpanNearQuery.GetSpans(AtomicReaderContext, IBits, IDictionary<Term, TermContext>)
    SpanNearQuery.Rewrite(IndexReader)
    Query.Boost
    Query.ToString()
    Namespace: Lucene.Net.Search.Payloads
    Assembly: Lucene.Net.dll
    Syntax
    public class PayloadNearQuery : SpanNearQuery

    Constructors

    | Improve this Doc View Source

    PayloadNearQuery(SpanQuery[], Int32, Boolean)

    Declaration
    public PayloadNearQuery(SpanQuery[] clauses, int slop, bool inOrder)
    Parameters
    Type Name Description
    SpanQuery[] clauses
    System.Int32 slop
    System.Boolean inOrder
    | Improve this Doc View Source

    PayloadNearQuery(SpanQuery[], Int32, Boolean, PayloadFunction)

    Declaration
    public PayloadNearQuery(SpanQuery[] clauses, int slop, bool inOrder, PayloadFunction function)
    Parameters
    Type Name Description
    SpanQuery[] clauses
    System.Int32 slop
    System.Boolean inOrder
    PayloadFunction function

    Fields

    | Improve this Doc View Source

    m_fieldName

    Declaration
    protected string m_fieldName
    Field Value
    Type Description
    System.String
    | Improve this Doc View Source

    m_function

    Declaration
    protected PayloadFunction m_function
    Field Value
    Type Description
    PayloadFunction

    Methods

    | Improve this Doc View Source

    Clone()

    Declaration
    public override object Clone()
    Returns
    Type Description
    System.Object
    Overrides
    SpanNearQuery.Clone()
    | Improve this Doc View Source

    CreateWeight(IndexSearcher)

    Declaration
    public override Weight CreateWeight(IndexSearcher searcher)
    Parameters
    Type Name Description
    IndexSearcher searcher
    Returns
    Type Description
    Weight
    Overrides
    SpanQuery.CreateWeight(IndexSearcher)
    | 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
    Overrides
    SpanNearQuery.Equals(Object)
    | Improve this Doc View Source

    GetHashCode()

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

    ToString(String)

    Declaration
    public override string ToString(string field)
    Parameters
    Type Name Description
    System.String field
    Returns
    Type Description
    System.String
    Overrides
    SpanNearQuery.ToString(String)

    See Also

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