Investigate changes in SERVER-104132: Implement vector similarity match expressions in server

XMLWordPrintableJSON

    • Type: Investigation
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Developer Tools

      Original Downstream Change Summary

      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.

              Assignee:
              Unassigned
              Reporter:
              Backlog - Core Eng Program Management Team
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: