Metamorph query expression character limit

Post Reply
barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

Metamorph query expression character limit

Post 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.
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

Metamorph query expression character limit

Post 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.
Post Reply