Use normalize_l2 for ivfflat

This commit is contained in:
Andrew Kane
2023-10-16 17:56:50 -07:00
parent dd609f200b
commit a5bb59d9f6
8 changed files with 38 additions and 35 deletions

View File

@@ -9,18 +9,19 @@ SELECT * FROM t ORDER BY val <=> '[3,3,3]';
[1,1,1]
[1,2,3]
[1,2,4]
(3 rows)
[0,0,0]
(4 rows)
SELECT COUNT(*) FROM (SELECT * FROM t ORDER BY val <=> '[0,0,0]') t2;
count
-------
3
4
(1 row)
SELECT COUNT(*) FROM (SELECT * FROM t ORDER BY val <=> (SELECT NULL::vector)) t2;
count
-------
3
4
(1 row)
DROP TABLE t;