Search before asking
Description
Motivation
Vector stores are first-class resources since #143. Java ships Elasticsearch, OpenSearch, Milvus and S3 Vectors; Python ships Chroma and Mem0. PostgreSQL with the pgvector extension is missing in both languages, although it is one of the most common self-hosted backends and is often already present in an organization. It supports cosine, L2 and inner-product distance with HNSW indexes, and stores metadata as jsonb, which maps directly onto the unified equality filter DSL.
Proposed changes
- New module
integrations/vector-stores/pgvector with PgVectorVectorStore implementing BaseVectorStore and CollectionManageableVectorStore, following MilvusVectorStore. Only new dependency is the PostgreSQL JDBC driver.
- Arguments follow the existing stores:
uri, username, password, collection (table name), dims, metric_type (COSINE, L2, IP), index_type, index_params.
- Semantic query only. Equality filters compile to a
jsonb containment predicate. Score semantics documented per metric.
- Python callers use the existing
JavaVectorStore wrapper. ResourceName constants, YAML aliases and docs added in both languages.
- Live tests gated by an environment variable, with a docker-compose file and a CI job mirroring the Elasticsearch one.
Out of scope: keyword and hybrid query modes, halfvec, a Python-native implementation.
Are you willing to submit a PR?
Search before asking
Description
Motivation
Vector stores are first-class resources since #143. Java ships Elasticsearch, OpenSearch, Milvus and S3 Vectors; Python ships Chroma and Mem0. PostgreSQL with the
pgvectorextension is missing in both languages, although it is one of the most common self-hosted backends and is often already present in an organization. It supports cosine, L2 and inner-product distance with HNSW indexes, and stores metadata asjsonb, which maps directly onto the unified equality filter DSL.Proposed changes
integrations/vector-stores/pgvectorwithPgVectorVectorStoreimplementingBaseVectorStoreandCollectionManageableVectorStore, followingMilvusVectorStore. Only new dependency is the PostgreSQL JDBC driver.uri,username,password,collection(table name),dims,metric_type(COSINE,L2,IP),index_type,index_params.jsonbcontainment predicate. Score semantics documented per metric.JavaVectorStorewrapper.ResourceNameconstants, YAML aliases and docs added in both languages.Out of scope: keyword and hybrid query modes,
halfvec, a Python-native implementation.Are you willing to submit a PR?