COSINE distance compares vectors based on the angle between them, which
allows you to measure similarity that isn't based on the vectors
magnitude. We recommend using DOT_PRODUCT with unit normalized vectors
instead of COSINE distance, which is mathematically equivalent with
better performance. See Cosine
Similarity to learn
more about COSINE similarity and COSINE distance. The resulting COSINE
distance decreases the more similar two vectors are.
DotProduct
Similar to cosine but is affected by the magnitude of the vectors. See
Dot Product to learn more.
The resulting distance increases the more similar two vectors are.
Euclidean
Measures the EUCLIDEAN distance between the vectors. See
Euclidean to learn
more. The resulting distance decreases the more similar two vectors are.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-21 UTC."],[[["This webpage provides documentation for the `FindNearest.Types.DistanceMeasure` enum within the Google Cloud Datastore v1 API, specifically within the .NET context."],["The documentation covers multiple versions of the API, ranging from version 3.2.0 up to the latest version, 4.15.0."],["The `DistanceMeasure` enum defines the method for calculating the distance between vectors, with options including `Cosine`, `DotProduct`, `Euclidean`, and `Unspecified`."],["Each distance measure type (`Cosine`, `DotProduct`, `Euclidean`) includes a brief description of how the distance is calculated and a link to a Wikipedia article for more information."]]],[]]