jeudi 28 mai 2015

SQLite FTS4: A query containing a single unary not expression?

The SQLite3 FTS4 documentation regarding the standard query unary - operator states:

An FTS query may not consist entirely of terms or term-prefix queries with unary "-" operators attached to them.

Is there any way around this? Specifically, I want to retrieve all the rows in my table that do not contain a term or term-prefix.

sqlite> select * from search;
1|Clock
2|Un
sqlite> select id from search where text match 'Un';
2
sqlite> select id from search where text match 'clock -Un';
1
sqlite> select id from search where text match '-Un';
Error: malformed MATCH expression: [-Un]
sqlite> select id from search where text match '-Un*';
Error: malformed MATCH expression: [-Un*]

Aucun commentaire:

Enregistrer un commentaire