Comment

Comment by AlexErrant

I had a... suboptimal experience with SQLite's FTS, so here it is for others: match queries don't work with `OR` conditions. You have to do this work around:

    WHERE
        fa.rowid IN (SELECT rowid FROM address_fts WHERE address_fts MATCH 'google')
        OR
        ta.rowid IN (SELECT rowid FROM address_fts WHERE address_fts MATCH 'google')
Source https://sqlite.org/forum/forumpost?udc=1&name=1a2f2ffdd80cf7...

I'm building a search feature for my app, that parses a user's search query (a la Github search) and returns relevant results. Generating the above workaround SQL on the fly is just... ulgh.

parent AlexErrant 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton