Fork me on GitHub
  • API

    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.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    this class and its derivations are experimental and subject to change
    Inheritance
    object
    PayloadFunction
    AveragePayloadFunction
    MaxPayloadFunction
    MinPayloadFunction
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Search.Payloads
    Assembly: Lucene.Net.dll
    Syntax
    public abstract class PayloadFunction

    Methods

    CurrentScore(int, string, int, int, int, float, float)

    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
    int docId

    The current doc

    string field

    The field

    int start

    The start position of the matching Span

    int end

    The end position of the matching Span

    int numPayloadsSeen

    The number of payloads seen so far

    float currentScore

    The current score so far

    float currentPayloadScore

    The score for the current payload

    Returns
    Type Description
    float

    The new current Score

    See Also
    Spans

    DocScore(int, string, int, float)

    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
    int docId

    The current doc

    string field

    The current field

    int numPayloadsSeen

    The total number of payloads seen on this document

    float payloadScore

    The raw score for those payloads

    Returns
    Type Description
    float

    The final score for the payloads

    See Also
    PayloadTermQuery

    Equals(object)

    Determines whether the specified object is equal to the current object.

    Declaration
    public override abstract bool Equals(object o)
    Parameters
    Type Name Description
    object o
    Returns
    Type Description
    bool

    true if the specified object is equal to the current object; otherwise, false.

    Overrides
    object.Equals(object)
    See Also
    PayloadTermQuery

    Explain(int, string, int, float)

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

    Note

    This API is experimental and might change in incompatible ways in the next release.

    this class and its derivations are experimental and subject to change
    Declaration
    public virtual Explanation Explain(int docId, string field, int numPayloadsSeen, float payloadScore)
    Parameters
    Type Name Description
    int docId
    string field
    int numPayloadsSeen
    float payloadScore
    Returns
    Type Description
    Explanation
    See Also
    PayloadTermQuery

    GetHashCode()

    Serves as the default hash function.

    Declaration
    public override abstract int GetHashCode()
    Returns
    Type Description
    int

    A hash code for the current object.

    Overrides
    object.GetHashCode()
    See Also
    PayloadTermQuery

    See Also

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