FTS5 speeds up substring searches but costs roughly 40% more indexing
time and 15% more index file size, so it now defaults to off.
- Add indexSqlConfig.fts5 (default false). When off, search uses the
existing unindexed query and no FTS table or triggers are created.
- When enabled, the index is built from existing rows on startup (no
rescan); disabling it drops the table and triggers.
- Regenerate config.yaml and swagger docs.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Quick search sent a request on every keystroke and each one ran an
unindexed lower(name) GLOB scan, so searches piled up and the last one
finished last. This:
- debounces the search input by 250ms, aborts the superseded request, and
ignores late responses so the UI cannot show stale results;
- passes the request context into the query (15s timeout) so an abandoned
search is interrupted instead of holding the index DB connection;
- removes the session-cancellation map, which could not interrupt the scan;
- adds one global FTS5 trigram index over (name, source:path) so substring
searches use an index. It is derived data: a schema or health mismatch
deletes and rebuilds the index DB, and it falls back to the old query
when FTS5 is unavailable.
Also fixes GLOB escaping: SQLite GLOB has no backslash escape, so literal
* ? [ in a search term and in the scope prefix now use bracket classes.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>