Cosine Distance. Defined as 1 - cosine similarity.
We strongly suggest using DOT_PRODUCT_DISTANCE + UNIT_L2_NORM instead
of COSINE distance. Our algorithms have been more optimized for
DOT_PRODUCT distance which, when combined with UNIT_L2_NORM, is
mathematically equivalent to COSINE distance and results in the same
ranking.
DotProductDistance
Dot Product Distance. Defined as a negative of the dot product.
[[["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-08-20 UTC."],[[["\u003cp\u003eThe latest version available for \u003ccode\u003eFeatureView.Types.IndexConfig.Types.DistanceMeasureType\u003c/code\u003e is 3.22.0, with links to documentation for numerous previous versions, down to version 1.0.0.\u003c/p\u003e\n"],["\u003cp\u003eThis documentation provides reference material and code samples for the \u003ccode\u003eFeatureView.Types.IndexConfig.Types.DistanceMeasureType\u003c/code\u003e enum within the Vertex AI v1 API.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDistanceMeasureType\u003c/code\u003e enum specifies the method used to measure distance in nearest neighbor searches and includes options such as \u003ccode\u003eCosineDistance\u003c/code\u003e, \u003ccode\u003eDotProductDistance\u003c/code\u003e, \u003ccode\u003eSquaredL2Distance\u003c/code\u003e, and \u003ccode\u003eUnspecified\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation strongly recommends using \u003ccode\u003eDOT_PRODUCT_DISTANCE\u003c/code\u003e along with \u003ccode\u003eUNIT_L2_NORM\u003c/code\u003e instead of \u003ccode\u003eCOSINE_DISTANCE\u003c/code\u003e, as it offers better optimization and equivalent results.\u003c/p\u003e\n"]]],[],null,[]]