Skip to main content

Module pgvector

Module pgvector 

Source
Expand description

pgvector AsyncVectorIndex (feature pgvector) — PostgreSQL + pgvector ext. pgvector AsyncVectorIndex — PostgreSQL + the pgvector extension.

PgVectorIndex implements AsyncVectorIndex over a sqlx::PgPool, mirroring qdrant/elastic (async remote vector backend). Vectors live in a {table}(id BIGINT PK, vec vector) relation; search uses the cosine distance operator <=>. Requires CREATE EXTENSION vector in the target DB (the table + HNSW index are created automatically by PgVectorIndex::new).

Structs§

PgVectorIndex
PostgreSQL vector index backed by the pgvector extension.