SQLite Forum

FTS5 rows not searchable with match
Login
Whatever I said to imply you were being obtuse I apologize for.

When you update the tables in a view, those changes are reflected in the view immediately. So that is expected. However, the triggers on the view are not run and so the FTS5 index is not updated.

If you query the FTS5 table by rowid, or just using "SELECT * FROM item_search", you will see the new rows. This is because FTS5 passes all such queries directly through to the underlying view or table. It only uses the FTS index - the thing that is not being updated - when you do a full-text query. Hence you can see the rows for non full-text queries, but not for those that use MATCH (or the other, equivalent, table-value function syntax).

> From what I can tell at this moment, I may have to myself run statements to insert, delete, and update the view any time I modify other tables that would potentially change the view and desired FTS data. Is that correct?

Entirely correct.

But really, why do it? If you're going to have to do separate update/delete/insert statements on the view, why not drop the triggers and run the required update/delete/insert statements on the fts5 table directly?

Dan.