Enum Class ScoreOption

java.lang.Object
java.lang.Enum<ScoreOption>
de.cxp.ocs.config.ScoreOption
All Implemented Interfaces:
Serializable, Comparable<ScoreOption>, Constable

public enum ScoreOption extends Enum<ScoreOption>
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Only usable for ScoreType.RANK_FEATURE to boost an according value.
    The decay parameter defines how documents are scored at the distance given at scale.
    Only usable for ScoreType.RANK_FEATURE to add a field-name suffix.
    Only usable for ScoreType.RANK_FEATURE and MODIFIER set to 'sigmoid'.
    Factor (double value) that is multiplied to each field value, before the modifier is applied to it.
    Specifies the value for a document that misses the value for the according scoring field.
    Mathematical modifier for the data values.
    If an offset is defined, the decay function will only compute the decay function for documents with a distance greater that the defined offset.
    required option for the decay_* score types.
    Only usable for ScoreType.RANK_FEATURE and MODIFIER set to 'sigmoid' or 'saturation'.
    if not set, the random function won't be deterministic and change for each request
    required option for the decay_* score types.
    required option for script_score
    Option that should be set with a boolean value (true|false).
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this class with the specified name.
    static ScoreOption[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • USE_FOR_VARIANTS

      public static final ScoreOption USE_FOR_VARIANTS

      Option that should be set with a boolean value (true|false).

      If set to "true", that scoring option will be used to score the variant records of a master among each other.

      The default behavior depends on the scoring function: Scoring function that are based on a variant field, then the default is "true". All other scoring functions are not used for variant scoring unless defined explicitly.

    • RANDOM_SEED

      public static final ScoreOption RANDOM_SEED
      if not set, the random function won't be deterministic and change for each request
    • MISSING

      public static final ScoreOption MISSING
      Specifies the value for a document that misses the value for the according scoring field.
    • MODIFIER

      public static final ScoreOption MODIFIER

      Mathematical modifier for the data values. With Elasticsearch 7 this is one of the strings "none", "log", "log1p", "log2p", "ln", "ln1p", "ln2p", "square", "sqrt", or "reciprocal".

      For score-type RANK_FEATURE the values 'linear', 'log', 'saturation' and 'sigmoid' are supported.

      see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html#function-field-value-factor

    • FACTOR

      public static final ScoreOption FACTOR
      Factor (double value) that is multiplied to each field value, before the modifier is applied to it.
    • BOOST

      public static final ScoreOption BOOST
      Only usable for ScoreType.RANK_FEATURE to boost an according value.
    • DYNAMIC_PARAM

      public static final ScoreOption DYNAMIC_PARAM
      Only usable for ScoreType.RANK_FEATURE to add a field-name suffix.
    • PIVOT

      public static final ScoreOption PIVOT
      Only usable for ScoreType.RANK_FEATURE and MODIFIER set to 'sigmoid' or 'saturation'. See ScoreType.RANK_FEATURE.
    • EXPONENT

      public static final ScoreOption EXPONENT
      Only usable for ScoreType.RANK_FEATURE and MODIFIER set to 'sigmoid'. See ScoreType.RANK_FEATURE.
    • SCRIPT_CODE

      public static final ScoreOption SCRIPT_CODE
      required option for script_score
    • ORIGIN

      public static final ScoreOption ORIGIN
      required option for the decay_* score types.

      The point of origin used for calculating distance. Must be given as a number for numeric field, date for date fields and geo point for geo fields. Required for geo and numeric field. For date fields the default is now. Date math (for example now-1h) is supported for origin.

      see ES Function Decay documentation
    • SCALE

      public static final ScoreOption SCALE
      required option for the decay_* score types.

      Required for all types. Defines the distance from origin + offset at which the computed score will equal decay parameter. For geo fields: Can be defined as number+unit (1km, 12m,…). Default unit is meters. For date fields: Can to be defined as a number+unit ("1h", "10d",…). Default unit is milliseconds. For numeric field: Any number.

      see ES Function Decay documentation
    • DECAY

      public static final ScoreOption DECAY
      The decay parameter defines how documents are scored at the distance given at scale.

      If no decay is defined, documents at the distance scale will be scored 0.5.

      Only used for decay_* score types
    • OFFSET

      public static final ScoreOption OFFSET
      If an offset is defined, the decay function will only compute the decay function for documents with a distance greater that the defined offset. The default is 0. Only used for decay_* score types.
  • Method Details

    • values

      public static ScoreOption[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ScoreOption valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null