Hey everybody,

I really need some help. Just changed a table of mine to support fts4 so
that I can do searches on it and noticed that INSERT OR REPLACE is not
working anymore as the way it is supposed to. Instead of replacing the item
with the primary ID it is instead adding a new entry. How can I prevent this
so that is working as it does without fts4. Here is my example:

CREATE VIRTUAL TABLE item USING fts4 (
    ID                                               INTEGER PRIMARY KEY,    
    name                                     TEXT                       
);

INSERT OR REPLACE INTO item (1,'Some Text');
INSERT OR REPLACE INTO item (2,'Some more Text');
INSERT OR REPLACE INTO item (1,'Text that should be replaced to');

With fts4:

Returns 3 rows instead of 2. 

1|Some Text
2|Some more Text
1|Text that should be replaced to

Without fts4:

Returns 2 rows. 

1|Text that should be replaced to
2|Some more Text


Can anyone help or has a workaround.

Thanks :)





--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/FTS4-INSERT-OR-REPLACE-Not-replacing-but-adding-item-tp71147.html
Sent from the SQLite mailing list archive at Nabble.com.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to