4 ms·
I liked the trick used here for speeding up tag key/value queries using a FTS index: SELECT id FROM entries e JOIN search s ON s.rowid = e.id W
by simonw 2y ago
I liked the trick used here for speeding up tag key/value queries using a FTS index:
SELECT id
FROM entries e
JOIN search s ON s.rowid = e.id
WHERE
-- use FTS index to find subset of possible results
search MATCH 'amenity cafe'
-- use the subset to find exact matches
AND tags->>'amenity' = 'cafe';
- jtarchie 2y agoAt first, I didn't do it, but I had that shower thought of "What If?" It worked! It was super helpful in finding more accurate results.