mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-07 05:00:56 +08:00
Added tests for index dimensions [skip ci]
This commit is contained in:
@@ -82,3 +82,14 @@ SELECT COUNT(*) FROM (SELECT * FROM t ORDER BY val <=> (SELECT NULL::halfvec)) t
|
||||
(1 row)
|
||||
|
||||
DROP TABLE t;
|
||||
-- dimensions
|
||||
CREATE TABLE t (val halfvec(4000));
|
||||
CREATE INDEX ON t USING ivfflat (val halfvec_l2_ops);
|
||||
NOTICE: ivfflat index created with little data
|
||||
DETAIL: This will cause low recall.
|
||||
HINT: Drop the index until the table has more data.
|
||||
DROP TABLE t;
|
||||
CREATE TABLE t (val halfvec(4001));
|
||||
CREATE INDEX ON t USING ivfflat (val halfvec_l2_ops);
|
||||
ERROR: column cannot have more than 4000 dimensions for ivfflat index
|
||||
DROP TABLE t;
|
||||
|
||||
Reference in New Issue
Block a user