Package com.mongodb.client.model
Enum Class ScoreNormalization
- All Implemented Interfaces:
Serializable,Comparable<ScoreNormalization>,java.lang.constant.Constable
Normalization methods for the
$score
and $scoreFusion pipeline stages.- Since:
- 5.10
- MongoDB documentation
- $score
- $scoreFusion
- Since server release
- 8.2
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionNormalizes the score to the range [0, 1] by applying min-max scaling.No normalization is applied.Normalizes the score to the range (0, 1) by applying the sigmoid function. -
Method Summary
Modifier and TypeMethodDescriptiongetValue()Returns the value as expected by the server.static ScoreNormalizationReturns the enum constant of this class with the specified name.static ScoreNormalization[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
No normalization is applied. -
SIGMOID
Normalizes the score to the range (0, 1) by applying the sigmoid function. -
MIN_MAX_SCALER
Normalizes the score to the range [0, 1] by applying min-max scaling.
-
-
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
-
getValue
Returns the value as expected by the server.- Returns:
- the server value
-