Versions in this module Expand all Collapse all v0 v0.24.0 Jun 24, 2026 Changes in this version + const DefaultPerPage + func IsStopWord(tok string) bool + func Tokenize(text string) []string + func WrapDB(db *sql.DB) querier + type Document struct + Fields map[string]any + ID string + func Doc(id string, fields map[string]any) Document + type Engine interface + Delete func(ctx context.Context, index string, ids ...string) error + Index func(ctx context.Context, index string, docs ...Document) error + Search func(ctx context.Context, index, query string, opts Options) (Results, error) + type Hit struct + Fields map[string]any + ID string + Score float64 + type Memory struct + func NewMemory() *Memory + func (m *Memory) Delete(_ context.Context, index string, ids ...string) error + func (m *Memory) Index(_ context.Context, index string, docs ...Document) error + func (m *Memory) Search(_ context.Context, index, query string, opts Options) (Results, error) + type Options struct + Filters map[string]any + Page int + PerPage int + Prefix bool + type PgConfig struct + Config string + FieldsColumn string + IDColumn string + VectorColumn string + WebSearch bool + type Postgres struct + func NewPostgres(db querier, cfg PgConfig) *Postgres + func (p *Postgres) Delete(ctx context.Context, index string, ids ...string) error + func (p *Postgres) Index(_ context.Context, _ string, _ ...Document) error + func (p *Postgres) Search(ctx context.Context, index, query string, opts Options) (Results, error) + type Results struct + Hits []Hit + Total int