Class VectorSearchAlgorithmMetric
java.lang.Object
com.azure.core.util.ExpandableStringEnum<VectorSearchAlgorithmMetric>
com.azure.search.documents.indexes.models.VectorSearchAlgorithmMetric
- All Implemented Interfaces:
com.azure.core.util.ExpandableEnum<String>
public final class VectorSearchAlgorithmMetric
extends com.azure.core.util.ExpandableStringEnum<VectorSearchAlgorithmMetric>
The similarity metric to use for vector comparisons. It is recommended to choose the same similarity metric as the
embedding model was trained on.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final VectorSearchAlgorithmMetricMeasures the angle between vectors to quantify their similarity, disregarding magnitude.static final VectorSearchAlgorithmMetricCalculates the sum of element-wise products to gauge alignment and magnitude similarity.static final VectorSearchAlgorithmMetricComputes the straight-line distance between vectors in a multi-dimensional space.static final VectorSearchAlgorithmMetricOnly applicable to bit-packed binary data types. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic VectorSearchAlgorithmMetricfromString(String name) Creates or finds a VectorSearchAlgorithmMetric from its string representation.values()Gets known VectorSearchAlgorithmMetric values.Methods inherited from class com.azure.core.util.ExpandableStringEnum
equals, fromString, getValue, hashCode, toString, values
-
Field Details
-
COSINE
Measures the angle between vectors to quantify their similarity, disregarding magnitude. The smaller the angle, the closer the similarity. -
EUCLIDEAN
Computes the straight-line distance between vectors in a multi-dimensional space. The smaller the distance, the closer the similarity. -
DOT_PRODUCT
Calculates the sum of element-wise products to gauge alignment and magnitude similarity. The larger and more positive, the closer the similarity. -
HAMMING
Only applicable to bit-packed binary data types. Determines dissimilarity by counting differing positions in binary vectors. The fewer differences, the closer the similarity.
-
-
Constructor Details
-
VectorSearchAlgorithmMetric
Deprecated.Use thefromString(String)factory method.Creates a new instance of VectorSearchAlgorithmMetric value.
-
-
Method Details
-
fromString
Creates or finds a VectorSearchAlgorithmMetric from its string representation.- Parameters:
name- a name to look for.- Returns:
- the corresponding VectorSearchAlgorithmMetric.
-
values
Gets known VectorSearchAlgorithmMetric values.- Returns:
- known VectorSearchAlgorithmMetric values.
-
fromString(String)factory method.