You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug] FTS5 full-text index is never backfilled on existing DBs — keyword search loses the pre-FTS corpus #1428
node_fts is an external-content FTS5 table with INSERT/UPDATE/DELETE triggers that index only future writes (sqlite_store.rs:176-204). User DBs are never reset (the code even ships migrate_embedding_origin for exactly this reason, lines 227-236) but there is no one-time FTS rebuild, so any node predating the FTS table is absent from node_fts and never returned by bm25_search_roots (MATCH, line 2987).
Fix: after creating the FTS table/triggers, run the idempotent INSERT INTO node_fts(node_fts) VALUES('rebuild'); once.
Found via the 2026-06-18 multi-repo bug-hunt sweep. Confidence/severity from the sweep + spot-verification.
Resolved in #1457. After the FTS triggers are created, a one-time idempotent INSERT INTO node_fts(node_fts) VALUES('rebuild') backfills the pre-FTS corpus — gated on the indexed-doc count (node_fts_docsize) differing from node, so a healthy DB doesn't re-index every startup. (count(*) FROM node_fts can't be the signal: external-content reads content rowids and always equals node count.) Test: an unindexed node becomes matchable after backfill.
Activity
mstomar125 commentedon Jun 24, 2026
Resolved in #1457. After the FTS triggers are created, a one-time idempotent
INSERT INTO node_fts(node_fts) VALUES('rebuild')backfills the pre-FTS corpus — gated on the indexed-doc count (node_fts_docsize) differing fromnode, so a healthy DB doesn't re-index every startup. (count(*) FROM node_ftscan't be the signal: external-content reads content rowids and always equals node count.) Test: an unindexed node becomes matchable after backfill.