Versions in this module Expand all Collapse all v0 v0.1.15 Dec 18, 2025 v0.1.14 Nov 28, 2025 Changes in this version + const DefaultCollectionName + const DefaultCollectionStoreTableName + const DefaultEmbeddingStoreTableName + const DefaultPreDeleteCollection + var ErrEmbedderWrongNumberVectors = errors.New("number of vectors from embedder does not match number of documents") + var ErrInvalidFilters = errors.New("invalid filters") + var ErrInvalidOptions = errors.New("invalid options") + var ErrInvalidScoreThreshold = errors.New("score threshold must be between 0 and 1") + var ErrUnsupportedOptions = errors.New("unsupported options") + type CloseNoErr interface + Close func() + type HNSWIndex struct + type Option func(p *Store) + func WithCollectionMetadata(metadata map[string]any) Option + func WithCollectionName(name string) Option + func WithCollectionTableName(name string) Option + func WithConn(conn PGXConn) Option + func WithConnectionURL(connectionURL string) Option + func WithEmbedder(e embeddings.Embedder) Option + func WithEmbeddingTableName(name string) Option + func WithHNSWIndex(m int, efConstruction int, distanceFunction string) Option + func WithPreDeleteCollection(preDelete bool) Option + func WithVectorDimensions(size int) Option + type PGXConn interface + Begin func(ctx context.Context) (pgx.Tx, error) + Exec func(ctx context.Context, sql string, arguments ...any) (pgconn.CommandTag, error) + Ping func(ctx context.Context) error + Query func(ctx context.Context, sql string, arguments ...any) (pgx.Rows, error) + QueryRow func(ctx context.Context, sql string, arguments ...any) pgx.Row + SendBatch func(ctx context.Context, batch *pgx.Batch) pgx.BatchResults + type Store struct + func New(ctx context.Context, opts ...Option) (Store, error) + func (s Store) AddDocuments(ctx context.Context, docs []schema.Document, options ...vectorstores.Option) ([]string, error) + func (s Store) Close() error + func (s Store) DropTables(ctx context.Context) error + func (s Store) RemoveCollection(ctx context.Context, tx pgx.Tx) error + func (s Store) Search(ctx context.Context, numDocuments int, options ...vectorstores.Option) ([]schema.Document, error) + func (s Store) SimilaritySearch(ctx context.Context, query string, numDocuments int, ...) ([]schema.Document, error)