How to use special characters with a word index

Posted by peggycole on 06-Oct-2015 02:08


A query like this:

for each item exclusive-lock
  where catdescription contains "(":
 display catdescription.

generates the error "QBW Syntax error - missing right parenthesis. (2877)". We got similar errors with ° (degrees), ² (square), ³ (cubic), ...

Our database does include all those special characters and we cannot stop our users from using those characters (field contains article descriptions). Any tips&tricks about how we can write these queries? (Using matches is not an option due to performance reasons).

Kind regards,


All Replies

Posted by Libor Laubacher on 06-Oct-2015 02:54

what is the codepage & collaction of the db in question and what word-break table do you use ?
If you want to have a query like that, or rather ‘… where fields contains “(*”’ you would need to amend the word-break rule file and add “(“ as ‘allowed’ character there, recompile the wb rules, redeploy proword.n and reindex the word index/es.
Example with ut8-bas.wbt
     '%',  USE_IT,
     '#',  USE_IT,
     '(',  USE_IT,
     '@',  USE_IT,
Then the query works.
Kind regards

This thread is closed