Table of Contents

Enum VectorSimilarity

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Vector similarity function to use to search for top K-nearest neighbors. See How to Index Fields for Vector Search for more information.

public enum VectorSimilarity

Fields

Euclidean = 0

Measures the distance between ends of vectors.

Cosine = 1

Measures similarity based on the angle between vectors.

DotProduct = 2

Measures similarity like cosine, but takes into account the magnitude of the vector.