This is explained in the documentation.
You do not need the two indexes for FTS searches.
You should declare the id
column as INTEGER PRIMARY KEY
.
You probably don't need the entry_id
column in the FST table.
Copy the text into the FTS table:
INSERT INTO search_eng_fts(id, re_value, ke_value, g_value)
SELECT id, re_value, ke_value, g_value FROM search_eng;
Then you can use the MATCH
operator to search in that table:
SELECT id FROM search_eng_fts WHERE re_value MATCH 'hello';