Class ExpDecayFunction

  • All Implemented Interfaces:
    ComposableScoreFunction, ScoreFunction

    public final class ExpDecayFunction
    extends Object
    implements ComposableScoreFunction
    An exponential decay function. The further the values are from an origin + offset, the lower the score.

    Important attributes to note:

    • Value is between 0 and 1.
    • When absolute distance from origin is less than or equal to offset, the value is 1.
    • When absolute distance from origin and offset is equal to scale, the value is equal to decay.

    Useful for applying multiplicative decay, based on recency of modification.

    See Elasticsearch supported decay functions for the formula being used.

    Since:
    7.0
    See Also:
    DecayParameters, GaussDecayFunction