SQLite FTS5 Query Returns Missing/Wrong Rows After Manual External-Content Edits

External-content FTS5 table drifted out of sync with its backing content table.

Runs locally in browser Free · No login Independently Verified 2026-11-25 v4.1.0
Identifier: SQLite FTS5 Query Returns Missing/Wrong Rows After Manual External-Content Edits Platform: SQLite
Common Root Causes:
  • External-content FTS5 table drifted out of sync with its backing content table.

Interactive Diagnostic Checklist

Verified Solutions:
  1. Rebuild the index cleanly via `INSERT INTO fts_idx(fts_idx) VALUES('rebuild');` and maintain sync triggers.
Safe Diagnostic Command:
sqlite3 <db> "INSERT INTO fts_idx(fts_idx) VALUES('integrity-check');"
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.

Technical Explanation

External-content FTS5 table drifted out of sync with its backing content table. Recommended diagnostic: `sqlite3 <db> "INSERT INTO fts_idx(fts_idx) VALUES('integrity-check');"`. Remediation: Rebuild the index cleanly via `INSERT INTO fts_idx(fts_idx) VALUES('rebuild');` and maintain sync triggers.

Worked Examples

  • Run `sqlite3 <db> "INSERT INTO fts_idx(fts_idx) VALUES('integrity-check');"` to verify root cause before applying the remediation.

Limitations & Assumptions

  • Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.

Source References & Verification

Resource ID: err-sqlite-fts5-rebuild-corruption · Independently verified: 2026-11-25

Related Resources