Including views,clicks and CTR in the search index

Post Reply
KMandalia
Posts: 301
Joined: Fri Jul 09, 2004 3:50 pm

Including views,clicks and CTR in the search index

Post by KMandalia »

I am not really sure how the search results are relevance ranked in the search script. but can i have views, clicks and CTR part of relevance ranking so that the pages that get highest clicks would get shown up higher?
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

Including views,clicks and CTR in the search index

Post by Kai »

You can alter the SQL statement to order the results by some formula that is a combination of these fields. The computed relevance rank (relevance of searched fields to query) is returned in $rank as a value from 0 to 1000. So for example, to order by relevance rank coupled with Clicks, you could "order by ($$rank + Clicks/100)". (the $-sign is escaped in Vortex by doubling it). This can be assigned to $sqlorder in the <a name=fpar> function.
Post Reply