AND ~

Post Reply
vaibhav.choksey
Posts: 17
Joined: Tue Apr 10, 2001 11:14 am

AND ~

Post 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?
User avatar
John
Site Admin
Posts: 2621
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

AND ~

Post 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.
John Turnbull
Thunderstone Software
vaibhav.choksey
Posts: 17
Joined: Tue Apr 10, 2001 11:14 am

AND ~

Post 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
User avatar
John
Site Admin
Posts: 2621
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

AND ~

Post 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?
John Turnbull
Thunderstone Software
Post Reply