(no title)
alexgarcia-xyz | 1 year ago
SELECT
rowid,
distance
FROM vec_items
WHERE rowid IN (SELECT rowid FROM ...)
AND title_embeddings MATCH ?
ORDER BY distance
LIMIT 10
^ This would do a KNN style query, k=10, but only include results where the item's rowid is included in the (...) subquery. This is a half-measure for metadata filtering, by pre-filtering which items should be considered in the KNN search.It's currently a bit slow, and not the best solution. Eventually there will be support for metadata column in vec0 tables, which with trickery should be much faster, but isn't planned for v0.1.0.
bendavis381|1 year ago