Is there any way to search for a particular string in a column?
I want to search like SELECT * from email_fts WHERE email_fts MATCH 'to:"a@b.com" OR from:"c@d.com"'
Thanks in advance,
Manoj
Is there any way to search for a particular string in a column?
I want to search like SELECT * from email_fts WHERE email_fts MATCH 'to:"a@b.com" OR from:"c@d.com"'
Thanks in advance,
Manoj
Make sure you create proper FTS columns in the FTS index:
And then you can search individual FTS columns:
EDIT: My previous answer had an
OR
in theWHERE
clause. Apparently sqlite doesn't support combiningOR
queries withMATCH
conditions. The above union works.FTS docs are here, this is one of the examples used in the docs.
http://sqlite.org/fts3.html