Enum ScoreOption
- java.lang.Object
-
- java.lang.Enum<ScoreOption>
-
- de.cxp.ocs.config.ScoreOption
-
- All Implemented Interfaces:
Serializable,Comparable<ScoreOption>
public enum ScoreOption extends Enum<ScoreOption>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DECAYThe decay parameter defines how documents are scored at the distance given at scale.FACTORFactor (double value) that is multiplied to each field value, before the modifier is applied to it.MISSINGSpecifies the value for a document that misses the value for the according scoring field.MODIFIERMathematical modifier for the data values.OFFSETIf an offset is defined, the decay function will only compute the decay function for documents with a distance greater that the defined offset.ORIGINrequired option for the decay_* score types.RANDOM_SEEDif not set, the random function won't be deterministic and change for each requestSCALErequired option for the decay_* score types.SCRIPT_CODErequired option for script_scoreUSE_FOR_VARIANTSOption that should be set with a boolean value (true|false).
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ScoreOptionvalueOf(String name)Returns the enum constant of this type with the specified name.static ScoreOption[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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 also be used to score the variant records of a master among each other.
Defaults to "false"
-
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"
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.
-
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 Detail
-
values
public static ScoreOption[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ScoreOption c : ScoreOption.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ScoreOption valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
-