Enum Class VectorSearchScoreMode

java.lang.Object
java.lang.Enum<VectorSearchScoreMode>
com.mongodb.client.model.search.VectorSearchScoreMode
All Implemented Interfaces:
Serializable, Comparable<VectorSearchScoreMode>, java.lang.constant.Constable

public enum VectorSearchScoreMode extends Enum<VectorSearchScoreMode>
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
  • Enum Constant Details

    • AVG

      public static final VectorSearchScoreMode AVG
      Use the average of the scores of the matching embeddings within a document.
    • MAX

      public static final VectorSearchScoreMode MAX
      Use the maximum of the scores of the matching embeddings within a document.
  • Method Details

    • values

      public static VectorSearchScoreMode[] 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

      public static VectorSearchScoreMode valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
      Returns the value used by the server for this score mode.
      Returns:
      the server value ("avg" or "max").
      Since:
      5.10