Skip to content
This documentation is sourced from a third-party project and is not maintained by pgEdge.

Half-Precision Indexing

Added in 0.7.0

Index vectors at half precision for smaller indexes

CREATE INDEX ON items USING hnsw ((embedding::halfvec(3)) halfvec_l2_ops);

Get the nearest neighbors

SELECT * FROM items ORDER BY embedding::halfvec(3) <-> '[1,2,3]' LIMIT 5;