0

I have a simple FTS4 query:

SELECT * FROM addresses 
  WHERE addresses MATCH '(PLZ:12* OR Nummer:12*) AND (Ort:Berlin*)'

This query works fine with SQLiteManager (I get some results), but when I execute this query with FMDB I don't get results (no errors but also no results).

When I use this query with FMDB it works:

SELECT * FROM addresses 
  WHERE addresses MATCH 'Ort:Berlin* PLZ:12* OR Nummer:12*'

It seems that FMDB has a problem with braces. Is there an alternative for the braces?

Is there a Bug in FMDB? I use the simple tokenizer:

[db executeUpdate:@"CREATE VIRTUAL TABLE IF NOT EXISTS addresses
  USING fts4(id, PLZ, Nummer, Ort, Strasse, tokenize=simple);"];
riv333
  • 389
  • 2
  • 12
  • 1
    What are the [compilation options](http://www.sqlite.org/compile.html) of the copy of the SQLite library used by FMDB? In particular, [SQLITE_ENABLE_FTS3_PARENTHESIS](http://www.sqlite.org/compile.html#enable_fts3_parenthesis)? – CL. Jul 12 '16 at 15:21
  • That is a good question. So long time ago we compiled that. But I will compile it again with that parameter. That could really be the problem, thanks! – riv333 Jul 12 '16 at 15:34
  • Yes that solved the problem. Thanks so much!! =) – riv333 Jul 12 '16 at 16:14

0 Answers0