Is is possible to still enjoy the benefits of FTS3/4 in SQLite while executing a query with AND statements on indexed columns in a virtual table? Example:
SELECT title, ID, creationDate FROM documents WHERE type=1 AND status=2 AND searchableFields MATCHES '"john doe"';
OR
SELECT title, ID, creationDate FROM documents WHERE type=1 AND status=2 AND searchableFields CONTAINS 'john doe';
Where the columns type and status are indexed in the virtual table.
All columns in an FTS table are text columns, and FTS-indexed; the documentation says:
You should not do searches like
type=1
on an FTS table:You should not think of an FTS table as a table, but as an index.
If you want to store non-text data, you should use a separate, normal table, and query it separately:
To avoid storing the same data twice, you can use contentless or external content tables.