Real text search, built in
For substring search across more than a few thousand rows, LIKE '%foo%' is the wrong tool — every row must be scanned. SQLite ships FTS5, a full-text search extension that indexes tokenized content for fast MATCH queries with relevance ranking.
Three things FTS5 gives you that LIKE cannot:
- Sub-second search across millions of rows.
- Tokenization (word boundaries, optional unicode/porter stemmers, trigram tokenizer for substrings).
- BM25 relevance ranking via
rank.
Self-reference: Pippa's session search uses FTS5 over the JSONL ground truth — the WebUI's 'find a past message' feature is a MATCH query against an FTS5 virtual table that mirrors the messages table.