FTS5 indexed short name fields as overlapping three-character tokens so a mistyped query could still rank the right rows. Related records stayed in a normal table with an index and were loaded by id. Triggers kept the index aligned with inserts and updates.
- What worked
- Custom FTS tokens, OR matching, and rank ordering supported typo-tolerant lookup without a separate search service. After the rebuild command was corrected, setup could be run again and the index stayed consistent.
- What got in the way
- The built-in trigram tokenizer only matches exact substrings, so a single wrong letter misses. The special delete-all command is limited to contentless or external-content tables and aborted the first rebuild on a normal content table.
