Read the documentation; FTS tables also have a rowid
column (also called docid
) that you can set explicitly to the same value as the corresponding key of the original table.
Assuming that news.id
is the rowid
(i.e., INTEGER PRIMARY KEY), you should change your trigger to also copy that ID value into the news_search
table.
You can the use that to look up the original record:
SELECT *
FROM news
WHERE id IN (SELECT docid
FROM news_search
WHERE news_title MATCH '😸')