Exact phrase first before anything else in SQLite FTS?
问题 Suppose the search input is 'what is'. This will match 'whatever it is' and also 'what is' which is the exact phrase. Now, how do I make the exact phrase first in the sorting? I've been thinking about this since yesterday and I keep on coming up with different solutions but each has somehow its own flaw. Here are my failed approach though (supposing input = 'what is'): SELECT snippet(fts), 1 as rank FROM fts WHERE body MATCH '"what is"' UNION ALL SELECT snippet(fts), 2 as rank FROM fts WHERE