Android SQLite Extended Query Syntax

I have the following SQLite query that works fine on my local machine:

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

This does not seem to return the same result set on my Android device as it did on my desktop. It returns much less results on Android. This query returns the correct results for both:

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

However, ideally, I would like to combine AND and OR queries instead of forcibly using AND.

Are there any specific features of the extended query syntax that Android does not support? Am I using the wrong syntax in the first instance?

+2
android sqlite android-sqlite fts3
Sep 07 '13 at 11:21
source share
1 answer

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

Your problem is that most (all?) Android manufacturers do not support extended query syntax.

You should limit yourself to queries that work with both syntaxes. Also, run PRAGMA compile_options to check if ENABLE_FTS3_PARENTHESIS is ENABLE_FTS3_PARENTHESIS .

+1
Sep 7 '13 at 13:31 on
source share



All Articles