Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class AveragePayloadFunction

    Calculate the final score as the average score of all payloads seen.

    Is thread safe and completely reusable.
    Inheritance
    object
    PayloadFunction
    AveragePayloadFunction
    Inherited Members
    PayloadFunction.Explain(int, string, int, float)
    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 class AveragePayloadFunction : PayloadFunction

    Methods

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

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

    Declaration
    public override 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

    Overrides
    PayloadFunction.CurrentScore(int, string, int, int, int, float, float)
    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 override 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

    Overrides
    PayloadFunction.DocScore(int, string, int, float)

    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
    PayloadFunction.Equals(object)

    GetHashCode()

    Serves as the default hash function.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for the current object.

    Overrides
    PayloadFunction.GetHashCode()
    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.