2
votes

I have the following SQLite query which works great on my local machine:

SELECT * FROM ftdata WHERE ftdata MATCH 'phrase1:this AND phrase2:that'

This doesn't seem to return the same resultset on my Android device as it does on my desktop. It returns far less results on Android. This query appears to return the correct results on both:

SELECT * FROM ftdata WHERE ftdata MATCH 'phrase1:this phrase2:that'

However I would ideally like to combine AND and OR queries instead of being forced to use AND.

Are there certain features of the enhanced query syntax that Android doesn't support? Am I using the incorrect syntax in the first instance?

1

1 Answers

2
votes

Different Android firmwares use different SQLite versions, but the FTS syntax has not changed for a long time.

Your problem is that most (all?) Android vendors do not enable the enhanced query syntax.

You should restrict yourself to queries that work with both syntaxes. Alternatively, execute PRAGMA compile_options to check whether ENABLE_FTS3_PARENTHESIS is set.