I'm trying to order a quick text search so that matches are first and partial matches are last.
I created a query that works in SQLiteStudio:
SELECT value, 1 AS _order FROM glossfts WHERE glossfts.value MATCH 'dog' UNION SELECT value, 2 AS _order FROM glossfts WHERE glossfts.value MATCH 'dog* NOT dog' ORDER BY _order
Thus, the result will be
Beware of dog 1 Disliked by everybody, not even a dog will eat 1 Bad dog 1 Creed, dogma 2 Dogs 2 Dogwood 2
And this works fine, but when I use the same request in android, I get
Beware of dog 1 Disliked by everybody, not even a dog will eat 1 Bad dog 1 Disliked by everybody, not even a dog will eat 2
back as it interprets:
MATCH 'dog* NOT dog'
but
MATCH 'dog* NOT dog'
What's happening?
android sqlite3 fts4
Spacehamster Jun 16 '13 at 11:00 2013-06-16 11:00
source share