Show / Hide Table of Contents

    Class PayloadTermQuery

    This class is very similar to SpanTermQuery except that it factors in the value of the payload located at each of the positions where the Term 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
    SpanTermQuery
    PayloadTermQuery
    Inherited Members
    SpanTermQuery.m_term
    SpanTermQuery.Term
    SpanTermQuery.Field
    SpanTermQuery.ExtractTerms(ISet<Term>)
    SpanTermQuery.ToString(String)
    SpanTermQuery.GetSpans(AtomicReaderContext, IBits, IDictionary<Term, TermContext>)
    Query.Boost
    Query.ToString()
    Query.Rewrite(IndexReader)
    Query.Clone()
    Namespace: Lucene.Net.Search.Payloads
    Assembly: Lucene.Net.dll
    Syntax
    public class PayloadTermQuery : SpanTermQuery

    Constructors

    | Improve this Doc View Source

    PayloadTermQuery(Term, PayloadFunction)

    Declaration
    public PayloadTermQuery(Term term, PayloadFunction function)
    Parameters
    Type Name Description
    Term term
    PayloadFunction function
    | Improve this Doc View Source

    PayloadTermQuery(Term, PayloadFunction, Boolean)

    Declaration
    public PayloadTermQuery(Term term, PayloadFunction function, bool includeSpanScore)
    Parameters
    Type Name Description
    Term term
    PayloadFunction function
    System.Boolean includeSpanScore

    Fields

    | Improve this Doc View Source

    m_function

    Declaration
    protected PayloadFunction m_function
    Field Value
    Type Description
    PayloadFunction

    Methods

    | 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
    SpanTermQuery.Equals(Object)
    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    SpanTermQuery.GetHashCode()

    See Also

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