Skip to content Skip to sidebar Skip to footer

Fts4 Sqlite Match Not Working

I've tried several methods from here: SQLite FTS example doesn't work and here: Full text search example in Android (best tutorial so far i think) However, my search returns 0 resu

Solution 1:

The FTS module searches for words (where the exact definition depends on the tokenizer used), or at best for words with a prefix.

MATCH words as designed; it does not find "a" because there is no word "a" in your data.

If you want to find substrings inside words, you must use LIKE.

Solution 2:

You are using % as a joker. In FTS requests, You have to use * instead.

LIKE "%word%"

MATCH "*word*"

I've noticed that for very short words (less than 3 letters), LIKE is faster than MATCH. For longer words, MATCH is faster.

Post a Comment for "Fts4 Sqlite Match Not Working"