That's a fantastic summary of the issue!  It's definitely some mix of puzzling and disturbing, since ideally an index makes things go faster (possibly via approximating the results in the VTREE case) but not otherwise differ in result semantics.  Regarding the query below, it cannot be run perfectly with SQL++'s semantics as an index-only query.
LET qvec = [1.1,2.2,3.3,4.4]
SELECT id
FROM col
WHERE year > 2000
ORDER BY ann_distance(qvec, embedding) LIMIT 20;

However, the following query CAN be:

LET qvec = [1.1,2.2,3.3,4.4]
SELECT id
FROM col
WHERE year > 2000
AND ann_distance(qvec, embedding) IS NOT UNKNOWN
ORDER BY ann_distance(qvec, embedding) LIMIT 20;

Reply via email to