Documentation
¶
Index ¶
Constants ¶
const ( StoreSQLite = internalvector.StoreSQLite StorePgVector = internalvector.StorePgVector StoreQdrant = internalvector.StoreQdrant StoreOpenSearch = internalvector.StoreOpenSearch StoreChroma = internalvector.StoreChroma StoreMemory = internalvector.StoreMemory StoreHNSW = internalvector.StoreHNSW // Deprecated: use Store* constants. BackendSQLite = StoreSQLite BackendPgVector = StorePgVector BackendQdrant = StoreQdrant BackendOpenSearch = StoreOpenSearch BackendChroma = StoreChroma BackendMemory = StoreMemory BackendHNSW = StoreHNSW )
Variables ¶
This section is empty.
Functions ¶
func NewMemoryStore ¶
func NewMemoryStore() *internalvector.MemoryStore
NewMemoryStore creates a vector store held in memory: nothing survives the process.
Types ¶
type Config ¶
type Config struct {
StoreKind StoreKind
DB *DBHandle
// Deprecated: use StoreKind.
Backend StoreKind
Dim int
PgVectorCreateExtension *bool
PgVectorIndexMethod string
PgVectorHNSWM int
PgVectorHNSWEfConstruction int
PgVectorIVFFlatLists int
QdrantHost string
QdrantPort int
QdrantAPIKey string
QdrantPrefix string
OpenSearchAddresses []string
OpenSearchUsername string
OpenSearchPassword string
OpenSearchAPIKey string
OpenSearchIndexPrefix string
OpenSearchCreateIndex *bool
OpenSearchKNN bool
OpenSearchInsecureSkipVerify bool
OpenSearchBulkSize int
ChromaURL string
ChromaAPIKey string
ChromaTenant string
ChromaDatabase string
// HNSWDir is the directory for HNSW index files (StoreHNSW only).
// Defaults to <runtime_root>/data/hnsw via pkg/config helpers.
HNSWDir string
}
Config selects and tunes a vector store: its kind, the database for the SQL-backed kinds, the dimension of the embeddings, and the settings specific to pgvector, Qdrant, OpenSearch, Chroma and HNSW.
type DBHandle ¶
DBHandle is the public vector-facing database descriptor. It intentionally avoids leaking the engine's internal DB type while keeping enough information to reopen a compatible low-level handle when needed.
func NewDBHandle ¶
NewDBHandle describes a database for a vector store by its driver name and DSN, with a busy timeout of 5 seconds for SQLite.
type Query ¶
type Query = internalvector.Query
Query describes a vector similarity search. Filter applies optional metadata predicates server-side (where supported) or client-side (SQLite / in-memory backends).
Simple equality: {"source_file": "doc.txt"} IN operator: {"source_file": {"$in": ["a.txt", "b.txt"]}}
type Record ¶
type Record = internalvector.Record
Record is one vectorized chunk stored in a vector store.
type SearchResult ¶
type SearchResult = internalvector.SearchResult
SearchResult is one ranked vector search hit.
type Store ¶
type Store = internalvector.Store
Store abstracts the vector storage/search engine used by RAG. Concrete implementations target SQLite, pgvector, Qdrant, Chroma, or any future provider — the rag.Service and knowledge.Service call only this interface.
type StoreKind ¶
type StoreKind = internalvector.StoreKind
StoreKind identifies which vector store implementation to use.