Package com.mongodb.client.model.search
Enum Class VectorSearchScoreMode
- All Implemented Interfaces:
Serializable,Comparable<VectorSearchScoreMode>,java.lang.constant.Constable
The score aggregation mode for a
$vectorSearch against arrays of embeddings in nested (embedded) documents.
If scoreMode is not specified, the server default is MAX ("max").
- Since:
- 5.10
- See Also:
- MongoDB Atlas documentation
- $vectorSearch
- Since server release
- 8.3
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptiongetValue()Returns the value used by the server for this score mode.static VectorSearchScoreModeReturns the enum constant of this class with the specified name.static VectorSearchScoreMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AVG
Use the average of the scores of the matching embeddings within a document. -
MAX
Use the maximum of the scores of the matching embeddings within a document.
-
-
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 used by the server for this score mode.- Returns:
- the server value (
"avg"or"max"). - Since:
- 5.10
-