Package de.cxp.ocs.config
Enum ScoreType
- java.lang.Object
-
- java.lang.Enum<ScoreType>
-
- de.cxp.ocs.config.ScoreType
-
- All Implemented Interfaces:
Serializable,Comparable<ScoreType>
public enum ScoreType extends Enum<ScoreType>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DECAY_EXPExponential decay that is calculated on numeric, date or geo-point data values.DECAY_GAUSSGaussian decay that is calculated on numeric, date or geo-point data values.DECAY_LINEARLinear decay that is calculated on numeric, date or geo-point data values.FIELD_VALUE_FACTORfield value factor scoring can only be applied on numeric score data.RANDOM_SCORERandom score for each document.SCRIPT_SCOREscore using custom script.WEIGHTSimple static weight score that is added to all documents.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ScoreTypevalueOf(String name)Returns the enum constant of this type with the specified name.static ScoreType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
WEIGHT
public static final ScoreType WEIGHT
Simple static weight score that is added to all documents. Useful to achieve a basic score for the other functions.
-
RANDOM_SCORE
public static final ScoreType RANDOM_SCORE
Random score for each document. The document id is used as a random see, so the same document gets the same reproducible score.
-
FIELD_VALUE_FACTOR
public static final ScoreType FIELD_VALUE_FACTOR
field value factor scoring can only be applied on numeric score data.
-
SCRIPT_SCORE
public static final ScoreType SCRIPT_SCORE
score using custom script. Make sure to provide the required option 'SCRIPT_CODE'.
-
DECAY_GAUSS
public static final ScoreType DECAY_GAUSS
Gaussian decay that is calculated on numeric, date or geo-point data values. Required parameters are 'ORIGIN', 'SCALE', 'OFFSET', and 'DECAY'. see ES Function Decay documentation
-
DECAY_LINEAR
public static final ScoreType DECAY_LINEAR
Linear decay that is calculated on numeric, date or geo-point data values. Required parameters are 'ORIGIN', 'SCALE', 'OFFSET', and 'DECAY'. see ES Function Decay documentation
-
DECAY_EXP
public static final ScoreType DECAY_EXP
Exponential decay that is calculated on numeric, date or geo-point data values. Required parameters are 'ORIGIN', 'SCALE', 'OFFSET', and 'DECAY'. see ES Function Decay documentation
-
-
Method Detail
-
values
public static ScoreType[] 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 (ScoreType c : ScoreType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ScoreType 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
-
-