-
Type:
Investigation
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
This ticket adds three new aggregation expressions that compute the similarity between two vectors (currently represented as arrays): $similarityDotProduct, $similarityCosine, and $similarityEuclideanDistance. The full syntax for these operators is here: https://docs.google.com/document/d/17lMK1EuW0s2VRNyKEuJ3Hkwhx8H54f9_Pgufrk6v4jo/edit?tab=t.0.
Description of Linked Ticket
We should add a $match expression that performs the equivalent of dot product, cosine similarity and euclidean distance functions in mongod, including with secondary indexes on those embedding fields.
In recent projects (prefix/suffix/substring FLE) in which we've added new expressions into MQL, we've decided to restrict new expressions to the aggregation language instead of adding to the $match language as well. We may want to follow suit in this ticket and only add aggregation expressions which have to be used within a $expr in a $match clause.
- depends on
-
SERVER-104132 Implement vector similarity match expressions in server
-
- Closed
-