Search code examples
databasesqlitefts3

how to convert existing sqlite database table to fts3 one?


I have normal sqlite database and want to use fts3. As mentioned in http://www.sqlite.org/fts3.html tutorial FTS table has to be created for using this search functionality.

Is there any way to convert existing table to FTS table?


Solution

  • I think the solution is to populate the FTS virtual table by yourself. I mean to open a new thread which will read from the exist database then write to the FTS table.

    Actually, I might find a better way, hope you are still watching this thread:

    Please check this thread: SQLite create pre-populated FTS table

    where the selected answer gave a better approach:

    first do CREATE VIRTUAL TABLE in your exist database, then populate the virtual table using the original table within your database.