Versions in this module Expand all Collapse all v1 v1.9.0 Oct 16, 2026 v1.8.1 Oct 16, 2026 v1.8.0 Oct 15, 2026 v1.5.0 Oct 12, 2026 Changes in this version + const BackendChroma + const BackendHNSW + const BackendMemory + const BackendOpenSearch + const BackendPgVector + const BackendQdrant + const BackendSQLite + const StoreChroma + const StoreHNSW + const StoreMemory + const StoreOpenSearch + const StorePgVector + const StoreQdrant + const StoreSQLite + type Backend = StoreKind + type ChromaConfig struct + APIKey string + BaseURL string + Database string + Tenant string + type ChromaStore struct + func NewChromaStore(cfg ChromaConfig) *ChromaStore + func (s *ChromaStore) DeleteKeys(ctx context.Context, namespace string, keys []string) error + func (s *ChromaStore) DeleteNamespace(ctx context.Context, namespace string) error + func (s *ChromaStore) Get(ctx context.Context, namespace string, keys []string) ([]Record, error) + func (s *ChromaStore) HasNamespace(ctx context.Context, namespace string) (bool, error) + func (s *ChromaStore) Search(ctx context.Context, query Query) ([]SearchResult, error) + func (s *ChromaStore) Upsert(ctx context.Context, records []Record) error + type Config struct + Backend StoreKind + ChromaAPIKey string + ChromaDatabase string + ChromaTenant string + ChromaURL string + DB *dbpkg.DB + Dim int + HNSWDir string + OpenSearchAPIKey string + OpenSearchAddresses []string + OpenSearchBulkSize int + OpenSearchCreateIndex *bool + OpenSearchIndexPrefix string + OpenSearchInsecureSkipVerify bool + OpenSearchKNN bool + OpenSearchPassword string + OpenSearchUsername string + PgVectorCreateExtension *bool + PgVectorHNSWEfConstruction int + PgVectorHNSWM int + PgVectorIVFFlatLists int + PgVectorIndexMethod string + QdrantAPIKey string + QdrantHost string + QdrantPort int + QdrantPrefix string + StoreKind StoreKind + type HNSWStore struct + func NewHNSWStore(dir string) (*HNSWStore, error) + func (s *HNSWStore) Close() error + func (s *HNSWStore) DeleteKeys(ctx context.Context, namespace string, keys []string) error + func (s *HNSWStore) DeleteNamespace(ctx context.Context, namespace string) error + func (s *HNSWStore) Get(ctx context.Context, namespace string, keys []string) ([]Record, error) + func (s *HNSWStore) HasNamespace(ctx context.Context, namespace string) (bool, error) + func (s *HNSWStore) Search(ctx context.Context, query Query) ([]SearchResult, error) + func (s *HNSWStore) Upsert(ctx context.Context, records []Record) error + type MemoryStore struct + func NewMemoryStore() *MemoryStore + func (s *MemoryStore) DeleteKeys(_ context.Context, namespace string, keys []string) error + func (s *MemoryStore) DeleteNamespace(_ context.Context, namespace string) error + func (s *MemoryStore) Get(_ context.Context, namespace string, keys []string) ([]Record, error) + func (s *MemoryStore) HasNamespace(_ context.Context, namespace string) (bool, error) + func (s *MemoryStore) Search(_ context.Context, query Query) ([]SearchResult, error) + func (s *MemoryStore) Upsert(_ context.Context, records []Record) error + type OpenSearchConfig struct + APIKey string + Addresses []string + BulkSize int + CreateIndex bool + DefaultDim int + IndexPrefix string + InsecureSkipVerify bool + KNN bool + Password string + RequestTimeout time.Duration + Username string + type OpenSearchStore struct + func NewOpenSearchStore(_ context.Context, cfg OpenSearchConfig) (*OpenSearchStore, error) + func (s *OpenSearchStore) Close() error + func (s *OpenSearchStore) DeleteKeys(ctx context.Context, namespace string, keys []string) error + func (s *OpenSearchStore) DeleteNamespace(ctx context.Context, namespace string) error + func (s *OpenSearchStore) Get(ctx context.Context, namespace string, keys []string) ([]Record, error) + func (s *OpenSearchStore) HasNamespace(ctx context.Context, namespace string) (bool, error) + func (s *OpenSearchStore) Search(ctx context.Context, query Query) ([]SearchResult, error) + func (s *OpenSearchStore) Upsert(ctx context.Context, records []Record) error + type PgVectorOptions struct + CreateExtension bool + Dim int + HNSWEfConstruction int + HNSWM int + IVFFlatLists int + IndexMethod string + TextSearchConfig string + type PgVectorStore struct + func NewPgVectorStore(ctx context.Context, database *dbpkg.DB, options PgVectorOptions) (*PgVectorStore, error) + func (s *PgVectorStore) DeleteKeys(ctx context.Context, namespace string, keys []string) error + func (s *PgVectorStore) DeleteNamespace(ctx context.Context, namespace string) error + func (s *PgVectorStore) Get(ctx context.Context, namespace string, keys []string) ([]Record, error) + func (s *PgVectorStore) HasNamespace(ctx context.Context, namespace string) (bool, error) + func (s *PgVectorStore) Search(ctx context.Context, query Query) ([]SearchResult, error) + func (s *PgVectorStore) Upsert(ctx context.Context, records []Record) error + type QdrantConfig struct + APIKey string + CollPrefix string + DefaultDim int + Host string + Port int + type QdrantStore struct + func NewQdrantStore(_ context.Context, cfg QdrantConfig) (*QdrantStore, error) + func (s *QdrantStore) Close() error + func (s *QdrantStore) DeleteKeys(ctx context.Context, namespace string, keys []string) error + func (s *QdrantStore) DeleteNamespace(ctx context.Context, namespace string) error + func (s *QdrantStore) Get(ctx context.Context, namespace string, keys []string) ([]Record, error) + func (s *QdrantStore) HasNamespace(ctx context.Context, namespace string) (bool, error) + func (s *QdrantStore) Search(ctx context.Context, query Query) ([]SearchResult, error) + func (s *QdrantStore) Upsert(ctx context.Context, records []Record) error + type Query struct + Filter map[string]any + HybridWeight float32 + Namespace string + QueryText string + TopK int + Vector []float32 + type Record struct + Key string + Metadata map[string]string + Namespace string + Text string + Vector []float32 + type SQLiteStore struct + func NewSQLiteStore(database *dbpkg.DB) (*SQLiteStore, error) + func OpenSQLiteStore(path string) (*SQLiteStore, error) + func (s *SQLiteStore) Close() error + func (s *SQLiteStore) CountNamespace(ctx context.Context, namespace string) (int, error) + func (s *SQLiteStore) DeleteKeys(ctx context.Context, namespace string, keys []string) error + func (s *SQLiteStore) DeleteNamespace(ctx context.Context, namespace string) error + func (s *SQLiteStore) Get(ctx context.Context, namespace string, keys []string) ([]Record, error) + func (s *SQLiteStore) HasNamespace(ctx context.Context, namespace string) (bool, error) + func (s *SQLiteStore) Search(ctx context.Context, query Query) ([]SearchResult, error) + func (s *SQLiteStore) Upsert(ctx context.Context, records []Record) error + type SearchResult struct + Record Record + Score float32 + type Store interface + DeleteKeys func(ctx context.Context, namespace string, keys []string) error + DeleteNamespace func(ctx context.Context, namespace string) error + Get func(ctx context.Context, namespace string, keys []string) ([]Record, error) + HasNamespace func(ctx context.Context, namespace string) (bool, error) + Search func(ctx context.Context, query Query) ([]SearchResult, error) + Upsert func(ctx context.Context, records []Record) error + func NewStore(ctx context.Context, cfg Config) (Store, error) + type StoreKind string