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
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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
ORin theWHEREclause. Apparently sqlite doesn’t support combiningORqueries withMATCHconditions. The above union works.FTS docs are here, this is one of the examples used in the docs.
http://sqlite.org/fts3.html