mirror of
https://github.com/pgvector/pgvector.git
synced 2026-12-06 09:18:52 +00:00
Added test for sparsevec query with max non-zero elements [skip ci]
This commit is contained in:
1 parent
5e62a12786
commit
b0665dca96
2 files changed
+17
No files matched your search
@@ -66,3 +66,9 @@ TRUNCATE t;
|
||||
CREATE INDEX ON t USING hnsw (val sparsevec_l2_ops);
|
||||
INSERT INTO t (val) VALUES (array_fill(1, ARRAY[1001])::vector::sparsevec);
|
||||
DROP TABLE t;
|
||||
|
||||
CREATE TABLE t (val sparsevec(16000));
|
||||
CREATE INDEX ON t USING hnsw (val sparsevec_l2_ops);
|
||||
INSERT INTO t (val) VALUES ('{}/16000'), ('{1:1}/16000');
|
||||
SELECT * FROM t ORDER BY val <-> array_fill(1, ARRAY[16000])::vector::sparsevec;
|
||||
DROP TABLE t;
|
||||
Reference in new issue
Block a user