Page 1 of 1

Metamorph query expression character limit

Posted: Thu Jun 07, 2012 8:12 pm
by barry.marcus
Is there a limit to the number of characters that can appear in a phrase within a metamorph query? Some of our queries are very long, and it appears that if the character count of a phrase exceeds a certain number then the query will fail.

Specifically, within our queries we have "exclusion" criteria such as:

<field> NOT LIKE 'term1* term2 term3* ... termN @0'

In one query, for example, there are about 1200 characters in the criteria string, which has 115 separate terms. In this case, the exclusion does not work. That is, we get hits that DO include terms that that are in the "NOT LIKE" list. When we eliminate some terms it seems to work. Moreover, if we break the long expression into two or more shorter expressions, each with the same structure, it also works. (While that seems like the best solution to this issue, it's not all that straightforward to implement in this case, since our legacy software constructs the single lengthy expression from user input.)

We don't suspect that the number of *words* is being exceeded since we set both qmaxwords and qmaxsetwords are set to 0. However, is there a parameter that sets the limit on the number of *characters* in a query?

Thanks.

Metamorph query expression character limit

Posted: Fri Jun 08, 2012 3:34 pm
by mark
The max sets in a query is fixed at 100.
You can either break the query into shorter ones as you suggest or create equiv sets for the non-wildcarded terms.

term1* (term2,term3,term4) term5* @0

The above would be 3 sets with 5 overall words.