Documentation
¶
Overview ¶
Package vectorstore defines the VectorStore interface for semantic search over embeddings -- None (disabled) by default, pgvector/Qdrant/Weaviate/Pinecone in production. Disabled by default, same convention as every other opt-in platform feature (llm_cache, rate_limit, webhooks, cron) -- enabled explicitly via langgraph.json's vector_store block, never implicitly just because POSTGRES_DSN happens to be set (an existing Postgres deployment may not have the pgvector extension available or permitted).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VectorStore ¶
type VectorStore interface {
// Upsert embeds/re-embeds an item under (namespace, id). Overwrites
// content/embedding/metadata on a repeat call with the same id --
// re-indexing a changed document is the common case, not a conflict.
Upsert(ctx context.Context, item *models.VectorItem) error
// Delete removes an item. No error if it never existed -- same
// idempotent-delete convention as the key-value store.
Delete(ctx context.Context, namespace, id string) error
// Search returns the topK nearest neighbors to embedding by cosine
// similarity, ordered best-first, optionally narrowed by an
// exact-match Metadata filter.
Search(ctx context.Context, req *models.VectorSearchRequest) ([]*models.VectorSearchResult, error)
// Init creates the schema/extension/indexes needed. Called once at
// control-plane startup, only when vector_store is configured.
// pgvector applies numbered migrations (vector_schema_migrations);
// Qdrant/Weaviate/Pinecone keep create-if-missing Init (no DDL trail).
Init(ctx context.Context) error
Close() error
}
VectorStore is the persistence + similarity-search interface every backend (pgvector, Qdrant, Weaviate, Pinecone) implements.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package conformance provides a backend-agnostic test suite for the vectorstore.VectorStore interface -- every backend (pgvector, Qdrant) runs the exact same tests, so a behavioral difference between them shows up as a test failure, not a surprise in production.
|
Package conformance provides a backend-agnostic test suite for the vectorstore.VectorStore interface -- every backend (pgvector, Qdrant) runs the exact same tests, so a behavioral difference between them shows up as a test failure, not a surprise in production. |
|
Package pgvector implements vectorstore.VectorStore using PostgreSQL's pgvector extension -- the vector/semantic store's Tier 1, stable backend.
|
Package pgvector implements vectorstore.VectorStore using PostgreSQL's pgvector extension -- the vector/semantic store's Tier 1, stable backend. |
|
Package pinecone implements vectorstore.VectorStore using Pinecone's REST API.
|
Package pinecone implements vectorstore.VectorStore using Pinecone's REST API. |
|
Package qdrant implements vectorstore.VectorStore using Qdrant's REST API -- the project's non-SQL exemplar for vector backends, same role Mongo plays for state.Store -- proof the vectorstore.VectorStore interface is implementable against a real standalone vector database, not just pgvector's SQL extension).
|
Package qdrant implements vectorstore.VectorStore using Qdrant's REST API -- the project's non-SQL exemplar for vector backends, same role Mongo plays for state.Store -- proof the vectorstore.VectorStore interface is implementable against a real standalone vector database, not just pgvector's SQL extension). |
|
Package weaviate implements vectorstore.VectorStore using Weaviate's REST + GraphQL APIs -- see internal/vectorstore/qdrant's package doc for the shared design principles (one shared class for every tenant/namespace, deterministic UUID v5 object IDs, plain HTTP rather than a generated client) this package follows too.
|
Package weaviate implements vectorstore.VectorStore using Weaviate's REST + GraphQL APIs -- see internal/vectorstore/qdrant's package doc for the shared design principles (one shared class for every tenant/namespace, deterministic UUID v5 object IDs, plain HTTP rather than a generated client) this package follows too. |