Make sure you create the correct FTS columns in the FTS index:
CREATE VIRTUAL TABLE email_fts USING fts3(subject, body, "to", "from");
And then you can search for individual FTS columns:
SELECT rowid FROM email_fts WHERE "to" MATCH ' a@b.com ' UNION SELECT rowid FROM email_fts WHERE "from" MATCH ' c@d.com '
EDIT: my previous answer had OR in a WHERE . Apparently sqlite does not support combining OR queries with MATCH conditions. The above union works.
The FTS docs are here; this is one example used in the docs.
http://sqlite.org/fts3.html
source share