fts5-external-content · shipping · also external-content FTS5

FTS5 external-content table

An FTS5 external-content table stores a full-text index while retrieving document values from another database object.

Related Observatory article: Read on hesela.com

The content option names the document source; content_rowid selects its key. Application logic must maintain both source and index. Triggers added after existing documents do not backfill them: in the fixture, a plain read returned three rows but MATCH found only the later insert. Rebuild restored search coverage. [1] [3]

Base-table REPLACE with recursive_triggers off left an old alpha posting that returned the new delta row despite all maintenance triggers existing. Enabling recursive triggers caused delete then insert; the tested conflict-targeted UPSERT caused an update under either setting. These are ordinary-table writes, not direct virtual-table writes. [5] [4]

Only ordinary VACUUM on the implicit-rowid table without an ordinary index changed IDs 1/3/8 to 1/2/3 among nine cases per build on SQLite 3.45.1 and 3.53.1. MATCH charlie returned hotel. INTO, backup and the other schema controls preserved IDs in these fixtures, not as a general guarantee. [9] [6]

Use a true rowid alias such as id INTEGER PRIMARY KEY with matching content_rowid for persistent identity. INT PRIMARY KEY and inline INTEGER PRIMARY KEY DESC are not aliases. Rebuild repaired current searches, not old IDs or references. [8] [7] [9]

Recovery acceptance needs two separate comparisons: the earlier ID-to-text mapping and stored token instances against a fresh current-content index. A baseline created after damage cannot establish earlier contents. [10] [11]

Relations

related
Inverted index, FTS5 integrity-check, SQLite expression index, SQLite Online Backup API, SQLite REPLACE

Citations

  1. SQLite FTS5: external content and integrity checking (accessed 2026-10-18)
  2. Hesela: eight executed FTS5 states and full query results (accessed 2026-10-18)
  3. Hesela: four REPLACE/UPSERT cases with rollback, trigger events and full query results (accessed 2026-10-19)
  4. SQLite ON CONFLICT: REPLACE deletion and recursive triggers (accessed 2026-10-19)
  5. SQLite: VACUUM and unaliased rowid changes (accessed 2026-11-01)
  6. SQLite: rowid persistence and integer-key aliases (accessed 2026-11-01)
  7. SQLite: exact INTEGER PRIMARY KEY alias rules (accessed 2026-11-01)
  8. Hesela: nine maintenance-identity cases on each of two SQLite builds (accessed 2026-11-01)
  9. Hesela: historical-row and current-index acceptance, 17 designed cases (accessed 2026-11-02)
  10. SQLite FTS5: instance vocabulary and token positions (accessed 2026-11-02)

Further reading

  1. Hesela: FTS5 query and verification controls (accessed 2026-10-18)
Sources & caveats
  • Designed fixtures on SQLite 3.45.1, default tokenizer and closed DELETE-journal files. Not a failure-rate estimate.
  • Nine designed maintenance cases per build, closed DELETE journal and no concurrent writer. Independent source/prose review only; no independent native replication or incident-rate estimate. [9]
  • The acceptance demonstrator uses fixed TEXT-only, unicode61, detail=full fixtures and a fresh index in the same SQLite engine. The baseline is known original input, not independently authenticated history or a general production checker. [10] [11]

JSON: /data/terms/fts5-external-content.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. FTS5 external-content table. Hesela. 2026-11-18. https://hesela.dev/terms/fts5-external-content/