Documentation
¶
Index ¶
- func ProbeFTS5(db *sql.DB) bool
- type FTS5Index
- func (idx *FTS5Index) BulkInsert(ctx context.Context, records []Record) error
- func (idx *FTS5Index) Delete(ctx context.Context, rowid string) error
- func (idx *FTS5Index) DropTable() error
- func (idx *FTS5Index) EnsureTable() error
- func (idx *FTS5Index) Insert(ctx context.Context, rowid string, values []string) error
- func (idx *FTS5Index) Search(ctx context.Context, query string, limit int) ([]SearchResult, error)
- func (idx *FTS5Index) Update(ctx context.Context, rowid string, values []string) error
- type Record
- type SearchResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FTS5Index ¶
type FTS5Index struct {
// contains filtered or unexported fields
}
FTS5Index manages an FTS5 virtual table for full-text search. It is domain-agnostic — it operates on raw table names, column names, rowids, and string values. Domain semantics (e.g., which entries to index) are the caller's responsibility.
func NewFTS5Index ¶
NewFTS5Index creates a new FTS5Index. Call EnsureTable() before use.
func (*FTS5Index) BulkInsert ¶
BulkInsert inserts multiple records in a single transaction.
func (*FTS5Index) EnsureTable ¶
EnsureTable creates the FTS5 virtual table if it does not exist. The table includes an UNINDEXED source_id column for row identification that is not included in FTS5 text search.
func (*FTS5Index) Insert ¶
Insert adds a new record to the FTS5 index. The rowid is a string identifier (typically the source entity's key). values must match the column order from NewFTS5Index.
type SearchResult ¶
SearchResult holds a single FTS5 search result.