Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 905
vaichidrewar Avatar asked May 13 '12 03:05

vaichidrewar


People also ask

How do you create a relationship between two tables in SQLite?

You create a relationship between two tables by adding the key (or a field) of one table into the other table. But really, you should get familiar with sql first. After you have done that, you can create relationships, or you'll find it convenient to use Ormlite.

What is FTS3?

FTS3 and FTS4 are SQLite virtual table modules that allows full-text searches to be performed on a set of documents. An FTS entity table always has a column named rowid that is the equivalent of an INTEGER PRIMARY KEY index.

What is FTS table?

Overview. FTS3 and FTS4 are SQLite virtual table modules that allows users to perform full-text searches on a set of documents. The most common (and effective) way to describe full-text searches is "what Google, Yahoo, and Bing do with documents placed on the World Wide Web".


1 Answers

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.

like image 71
dumbfingers Avatar answered Sep 29 '22 18:09

dumbfingers