Page 1 of 1

AND ~

Posted: Fri Jun 22, 2001 8:07 pm
by vaibhav.choksey
Hi!
Having Problem with AND operation.
I am using the query
select ID, $rank rankval, PARENT_ID, NAME from Search where NAME\TEXT likep '~Conservation ~ ELectric'GROUP BY PARENT_TYPE_ID ORDER BY rankval DESC;

But brings back all the results including Conservation or Electric, containing one or both words. Actually it sees at OR. I don't know why it doesn't take it as AND operation. Because I don't have a single record which consists of both words at same time.
Please can you tell me the problem. Is it something wrong with MetaMorph index?

AND ~

Posted: Fri Jun 22, 2001 9:08 pm
by John
No, that is the designed operation of LIKEP, which will return the best matches first. If you want to require all terms be present you should issue:

<SQL "set likepallmatch=1"></SQL>

before your query. You may also need to adjust your <apicp> query protection settings to allow thesaurus terms.

AND ~

Posted: Sat Jun 23, 2001 1:26 pm
by vaibhav.choksey
But by using:
<sql NOVARS "set likepallmatch=1"></sql>
It doesn't evaluate OR condition now:
But evaluates AND condition correctly.

As you suggested I have following Apicp variables
<apicp "alequivs" "on">
<apicp "alpostproc" "on">
<apicp "allinear" "on">
<apicp "alintersects" "on">

<sql NOVARS "set likepleadbias=600;"></sql>
<sql NOVARS "set likepallmatch=1"></sql>
Please help me with this. Thanks

AND ~

Posted: Sat Jun 23, 2001 1:50 pm
by John
What exactly are you trying to achieve? The likepallmatch setting controls whether all terms are required or not. What queries are you issuing, and what results do you want?