search-falls-back-to-substring

IN premise

`api.search()` tries FTS5 full-text search first, then falls back to substring matching if FTS5 tables don't exist or error; it always produces results if substring matches exist.

Summary

The search function has a two-tier strategy: it first attempts a full-text search using FTS5, and if that isn't available or fails, it quietly drops down to simple substring matching. This means search will never return empty-handed just because the full-text index is missing — users will always get results as long as the text appears somewhere, though the quality of ranking may be lower without FTS5.

Dependents

These beliefs depend on this one:

Details

Sourceentries/2026/04/24/reasons_lib-api.md