Show / Hide Table of Contents

    Class PayloadFunction

    An abstract class that defines a way for Payload*Query instances to transform the cumulative effects of payload scores for a document.

    @lucene.experimental this class and its derivations are experimental and subject to change

    Inheritance
    System.Object
    PayloadFunction
    AveragePayloadFunction
    MaxPayloadFunction
    MinPayloadFunction
    Namespace: Lucene.Net.Search.Payloads
    Assembly: Lucene.Net.dll
    Syntax
    public abstract class PayloadFunction : object

    Methods

    | Improve this Doc View Source

    CurrentScore(Int32, String, Int32, Int32, Int32, Single, Single)

    Calculate the score up to this point for this doc and field

    Declaration
    public abstract float CurrentScore(int docId, string field, int start, int end, int numPayloadsSeen, float currentScore, float currentPayloadScore)
    Parameters
    Type Name Description
    System.Int32 docId

    The current doc

    System.String field

    The field

    System.Int32 start

    The start position of the matching Span

    System.Int32 end

    The end position of the matching Span

    System.Int32 numPayloadsSeen

    The number of payloads seen so far

    System.Single currentScore

    The current score so far

    System.Single currentPayloadScore

    The score for the current payload

    Returns
    Type Description
    System.Single

    The new current Score

    See Also
    Spans
    | Improve this Doc View Source

    DocScore(Int32, String, Int32, Single)

    Calculate the final score for all the payloads seen so far for this doc/field

    Declaration
    public abstract float DocScore(int docId, string field, int numPayloadsSeen, float payloadScore)
    Parameters
    Type Name Description
    System.Int32 docId

    The current doc

    System.String field

    The current field

    System.Int32 numPayloadsSeen

    The total number of payloads seen on this document

    System.Single payloadScore

    The raw score for those payloads

    Returns
    Type Description
    System.Single

    The final score for the payloads

    | Improve this Doc View Source

    Equals(Object)

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

    Explain(Int32, String, Int32, Single)

    Declaration
    public virtual Explanation Explain(int docId, string field, int numPayloadsSeen, float payloadScore)
    Parameters
    Type Name Description
    System.Int32 docId
    System.String field
    System.Int32 numPayloadsSeen
    System.Single payloadScore
    Returns
    Type Description
    Explanation
    | Improve this Doc View Source

    GetHashCode()

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

    See Also

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