Page 1 of 1

REX Alternate to - Logical Operator

Posted: Tue Apr 02, 2002 2:06 pm
by kzinda
The application that was written for me takes my query terms and always constructs a query syntax in the form:

$Field like '+word1 +word2'

in which case I cannot use the "-" logical operator to remove a hit using the "must not include" term. Is there a way to generate a REX expression to emulate the must not include operator? My query generator does accept REX expressions.

REX Alternate to - Logical Operator

Posted: Tue Apr 02, 2002 2:25 pm
by Kai
Not really, if your script is always placing a `+' in front of each term. In any event such a REX expression would be unindexable and slow searches down.

Also, if the query is using LIKE as in your example, all terms are already required if they do not have a `+' or `-' (if there is no `@' operator), so I'm not sure why `+' is being prefixed unless something else is going on.

The best solution would be to drop the `+' prefixing, or at least edit the script to check for a leading `+' or `-' on search words first before prefixing a `+'.