vendredi 6 février 2015

ORDER BY clause in SQLite working erratically using fts4

My Full Text Search using sqlite3 with fts4 is working perfectly, but the ordering is behaving erratically. A few items in the middle (and in the end) of the results are misplaced.


I'm using this search query:



SELECT * FROM MyFTSTable WHERE [search term] ORDER BY BookID ASC, Chapter ASC, Paragraph ASC


Being BookID, Chapter and Paragraph of int type.


I created the Virtual Table like so:



CREATE VIRTUAL TABLE MyFTSTable USING fts4(id integer PRIMARY KEY, BookID integer, Chapter integer, Paragraph integer, Text text, order=ASC)


Any ideas why this is happening?


Aucun commentaire:

Enregistrer un commentaire