diff options
| author | Grail Finder <wohilas@gmail.com> | 2026-03-09 07:07:36 +0300 |
|---|---|---|
| committer | Grail Finder <wohilas@gmail.com> | 2026-03-09 07:07:36 +0300 |
| commit | 0e42a6f069ceea40485162c014c04cf718568cfe (patch) | |
| tree | 583a6a6cb91b315e506990a03fdda1b32d0fe985 /storage/migrations/003_add_fts.up.sql | |
| parent | 2687f38d00ceaa4f61034e3e02b9b59d08efc017 (diff) | |
| parent | a1b5f9cdc59938901123650fc0900067ac3447ca (diff) | |
Merge branch 'master' into feat/agent-flow
Diffstat (limited to 'storage/migrations/003_add_fts.up.sql')
| -rw-r--r-- | storage/migrations/003_add_fts.up.sql | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/storage/migrations/003_add_fts.up.sql b/storage/migrations/003_add_fts.up.sql new file mode 100644 index 0000000..114586a --- /dev/null +++ b/storage/migrations/003_add_fts.up.sql @@ -0,0 +1,15 @@ +-- Create FTS5 virtual table for full-text search +CREATE VIRTUAL TABLE IF NOT EXISTS fts_embeddings USING fts5( + slug UNINDEXED, + raw_text, + filename UNINDEXED, + embedding_size UNINDEXED, + tokenize='porter unicode61' -- Use porter stemmer and unicode61 tokenizer +); + +-- Create triggers to maintain FTS table when embeddings are inserted/deleted +-- Note: We'll handle inserts/deletes programmatically for simplicity +-- but triggers could be added here if needed. + +-- Indexes for performance (FTS5 manages its own indexes) +-- No additional indexes needed for FTS5 virtual table.
\ No newline at end of file |
