Hi list:

In a C++ Windows app that uses SQLite v. 3.9.1 and behaves well, I try change 
the search engine from FTS3/4 modules to FTS5, by means off:

1. Define the directive

2.-  Create the table:
CREATE VIRTUAL TABLE ftsm USING fts5(nm,tokenize='porter unicode61 
remove_diacritics 0',columnsize=0)

3.- Populate the table:
INSERT INTO ftsm (row,nm) SELECT id,nm FROM atm WHERE(..)

After that, the app and the search engine works as espected.

To update the ftsm table after several inserts and deletes, I try to follow 
this steps

1a.- Delete the previous table.

2a.- Create table (as above)

3a.- Populate table (as above).

This scheme work ok with the FST3/4 modules, but compiling with FTS5 gives an 
erroro in 1a:  "database disk image is malformed".

Note that in previous attemps I believed that the problem was into try to 
delete a ftsm table build with the previous modules, but the error happen when 
trying delete a table build with the FTS5 module.

I managed to drop the ftsm table by means of create a new dbase; create the 
same tables (except ftsm); populate the tables, and replacing the previous 
dbase with the new one. But obviously, this method is primitive; time 
consuming, and has problems when the dbase is in use.

Some clues?

Thanks in advance.

Adolfo J. Millan

Reply via email to