couchbase-lite-core
couchbase-lite-core copied to clipboard
Last-minute changes to vector search SQL++ syntax
As per recent meetings & email threads, for Server SQL++ compatibility.
- There is no more
VECTOR_MATCHfunction. VECTOR_DISTANCErenamed toAPPROX_VECTOR_DIST.- Parameters are (vector expression, target vector, [metric], [nprobes]); last two optional.
- metric, if given, is a case-insensitive string that must match the index's metric. Current supported values are
"EUCLIDEAN_SQUARED","L2_SQUARED","COSINE". - nprobes, if given, overrides the value specified when the index was created.
- A non-hybrid vector query must have a
LIMITclause. There is no more default limit. - A hybrid query is one with a
WHEREclause (and aAPPROX_VECTOR_DISTcall, of course.) - Two new metrics in the API:
kC4VectorMetricEuclidean1andkC4VectorMetricDot.- I renamed
kC4VectorMetricEuclideantokC4VectorMetricEuclidean2to avoid ambiguity. - Using the new metrics at runtime requires an updated vector-search extension; see https://github.com/couchbaselabs/mobile-vector-search/pull/69
- Their SQL++ names are
"EUCLIDEAN"(AKA"L2") and"DOT".
- I renamed