(Please disregard my first email. I hit the wrong button and sent the
email to early.)

It seems that creating a virtual FTS3 table with ICU tokenizer breaks
FTS3 parenthesis. Example:

— Create test table participant
CREATE VIRTUAL TABLE 'participant' USING fts4 (tokenize=icu de_DE,
firstName, lastName);


— Create some test entries. E.g. „Christian“, „Christopher“, „Christina“
INSERT into…..

— Select using MATCH with FTS3 parenthesis
SELECT * FROM participant WHERE participant MATCH '(lastname:c*) OR
(firstname:c*)' ORDER BY lastname, firstname


==> This doesn’t return any results.

— Select using MATCH without parenthesis:

SELECT * FROM participant WHERE participant MATCH 'lastname:c* OR
firstname:c*' ORDER BY lastname, firstname

==> This returns our three test entries



However, when the table is created without the tokenize option, the MATCH
statement with parenthesis works as expected and returns the three
results. Matching and sorting using ICU otherwise works (without
parenthesis). 

I compile SQLite with ICU for the iPhone with the following flags:


#define SQLITE_ENABLE_FTS4
#define SQLITE_ENABLE_RTREE
#define SQLITE_ENABLE_FTS3_PARENTHESIS
#define SQLITE_ENABLE_ICU
#define SQLITE_ENABLE_MEMSYS5
#define SQLITE_ENABLE_FTS4_UNICODE61

Ben

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to