search-uses-fts5-with-substring-fallback
IN premise
`api.search()` tries FTS5 first (`_fts_search`), falls back to substring matching (`_substring_search`), then expands results with 1-hop neighbors from the dependency graph.
Summary
The search system has a tiered strategy: it first attempts a full-text search for speed and relevance ranking, and if that fails or returns nothing, it falls back to simple substring matching so queries never silently return empty. After finding matches either way, it pulls in directly connected beliefs from the dependency graph, which means searching for one concept will surface its immediate justifications and dependents too.
Details
| Source | entries/2026/04/29/reasons_lib-api.md |