Enum Class ScoreOption
- All Implemented Interfaces:
Serializable
,Comparable<ScoreOption>
,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionOnly 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 requestrequired option for the decay_* score types.required option for script_scoreOption that should be set with a boolean value (true|false). -
Method Summary
Modifier and TypeMethodDescriptionstatic ScoreOption
Returns the enum constant of this class with the specified name.static ScoreOption[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
if not set, the random function won't be deterministic and change for each request -
MISSING
Specifies the value for a document that misses the value for the according scoring field. -
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
Factor (double value) that is multiplied to each field value, before the modifier is applied to it. -
BOOST
Only usable for ScoreType.RANK_FEATURE to boost an according value. -
DYNAMIC_PARAM
Only usable for ScoreType.RANK_FEATURE to add a field-name suffix. -
PIVOT
Only usable for ScoreType.RANK_FEATURE and MODIFIER set to 'sigmoid' or 'saturation'. See ScoreType.RANK_FEATURE. -
EXPONENT
Only usable for ScoreType.RANK_FEATURE and MODIFIER set to 'sigmoid'. See ScoreType.RANK_FEATURE. -
SCRIPT_CODE
required option for script_score -
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
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
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
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
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
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 nameNullPointerException
- if the argument is null
-