LIKE '%word%' reads every row and can’t rank anything. SQLite ships a full-text engine, FTS5, that builds a word index.
CREATE VIRTUAL TABLE notes USING fts5(title, body);
INSERT INTO notes VALUES ('sqlite wal', 'write ahead logging lets readers continue');
SELECT title, snippet(notes, 1, '[', ']', '...', 5)
FROM notes WHERE notes MATCH 'read*' ORDER BY rank;
MATCH takes a query string: plain words, read* for a prefix, "exact phrase", AND, OR and NOT, and title:wal to search one column. ORDER BY rank sorts by relevance, best match first, which is the order I’d want for a search box. snippet() returns a short piece of the text around the hit with markers you choose, and highlight() wraps the hits in the full column.
For example, read* finds readers and also proxy_read_timeout, because the default tokenizer splits on underscores. Good to know when you index code or config.
The FTS table is a separate copy of the text. It doesn’t follow your normal table, so you either insert into both or use the external content option with triggers, which the FTS5 docs describe. The default tokenizer also does no stemming, so running does not find run; the porter tokenizer adds that for English. Most builds include FTS5; PRAGMA compile_options; lists ENABLE_FTS5 when yours does.
Further reading: SQLite FTS5 extension