likep rank value

Post Reply
jlin
Posts: 27
Joined: Fri Apr 06, 2001 4:03 pm

likep rank value

Post by jlin »

Hi,
Is there a way to find out the rank value for each of the documents returned by the likep queries? Can I specify only the records that above certain rank point will be returned in order to improve relevancy?
Thanks!
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

likep rank value

Post by Kai »

The "column" $rank contains the rank value for a LIKEP query. Note that you'll have to escape and rename this column if selecting it in Vortex:

<SQL ROW "select $$rank rank, Subject from mytable
where Body likep $query">
Subject: $Subject
Rank: $rank
</SQL>

You can use this in the WHERE clause to limit results to a minimum rank if you wish, eg. "... where Body likep $query and $$rank > 600"
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

likep rank value

Post by mark »

Also note that answers are returned in rank order by default so that the best matches come out first. There's not much reason to use a cutoff value since the most relevant documents will always be first.
jlin
Posts: 27
Joined: Fri Apr 06, 2001 4:03 pm

likep rank value

Post by jlin »

Thanks for the quick response! Another question is: will it improve the performance of the likep queries if I set 'likeprows' to a smaller number? any suggestions on how to improve the performance?
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

likep rank value

Post by John »

Lowering likeprows can improve performance, however with the default settings there wouldn't be much improvement in general by lowering it. The usual thing to check with performance are making sure you have a metamorph inverted index on the field, and that it is up to date. You can also try likepallmatch to require all terms must be present. Do you have a large number of documents that match the query?
John Turnbull
Thunderstone Software
jlin
Posts: 27
Joined: Fri Apr 06, 2001 4:03 pm

likep rank value

Post by jlin »

Yes.
bart
Posts: 251
Joined: Wed Apr 26, 2000 12:42 am

likep rank value

Post by bart »

Using likepallmatch by default will improve your retrieval rates substantially if you are averaging a large number of matching documents per query.
rajesh11
Posts: 52
Joined: Fri Dec 16, 2005 7:41 am

likep rank value

Post by rajesh11 »

Here is Code Section :
<sql "select id Mid, $$rank rawrank from html where StoryDescription\StoryTitle likep $sq and not(id=$id) and StoryTitle!='' and (convert('now', 'date') - Modified)/60<720 and $$rank > 300">
Catno --- $Catno Mid .... $Mid -- $rawrank <br>
</sql>

it does not work but when i do it via vortex :

<sql "select id Mid, $$rank rawrank from html where StoryDescription\StoryTitle likep $sq and not(id=$id) and StoryTitle!='' and (convert('now', 'date') - Modified)/60<720">
<if $rawrank gt 300>
Catno --- $Catno Mid .... $Mid -- $rawrank <br>
</if>
</sql>

it works, could you suggest where is the problem.

Thanks
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

likep rank value

Post by mark »

"works for me" as they say. What's your texis -version output?

Do you get any warnings in html comments in the results or in vortex.log?
Post Reply