SQLite FTS5 Error: no such column (Unquoted Hyphen in MATCH Query)
Hyphens in FTS5 `MATCH` queries are parsed as `NOT` column operators (e.g. `e-mail`).
Runs locally in browser
Free · No login
Independently Verified 2026-11-25
v4.1.0
Identifier: SQLite FTS5 Error
Platform: SQLite
Common Root Causes:
- Hyphens in FTS5 `MATCH` queries are parsed as `NOT` column operators (e.g. `e-mail`).
Interactive Diagnostic Checklist
Verified Solutions:
- Escape and quote user search terms (`"term"`) before passing to FTS5 `MATCH`.
Safe Diagnostic Command:
Test query with double-quoted token in sqlite3
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.
Technical Explanation
Hyphens in FTS5 `MATCH` queries are parsed as `NOT` column operators (e.g. `e-mail`). Recommended diagnostic: `Test query with double-quoted token in sqlite3`. Remediation: Escape and quote user search terms (`"term"`) before passing to FTS5 `MATCH`.
Worked Examples
- Run `Test query with double-quoted token in sqlite3` 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-syntax-error-dash · Independently verified: 2026-11-25