You've already forked pgvecto.rs
mirror of
https://github.com/tensorchord/pgvecto.rs.git
synced 2025-07-29 08:21:12 +03:00
* chore: add crash test Signed-off-by: cutecutecat <junyuchen@tensorchord.ai> * fix Signed-off-by: cutecutecat <junyuchen@tensorchord.ai> --------- Signed-off-by: cutecutecat <junyuchen@tensorchord.ai>
14 lines
366 B
Plaintext
14 lines
366 B
Plaintext
statement ok
|
|
CREATE TABLE t (val vector(3));
|
|
|
|
statement ok
|
|
INSERT INTO t (val) SELECT ARRAY[random(), random(), random()]::real[] FROM generate_series(1, 1000);
|
|
|
|
statement ok
|
|
CREATE INDEX i ON t USING vectors (val vector_l2_ops)
|
|
WITH (options = "[indexing.hnsw]");
|
|
|
|
query I
|
|
SELECT COUNT(1) FROM (SELECT 1 FROM t ORDER BY val <-> '[0.5,0.5,0.5]' limit 10) t2;
|
|
----
|
|
10 |