This little hack makes the ranking algorithm count the actual search terms matched, in stead of the various words that match those terms.
This is very useful when "Substring match for all searches" is on (practically makes that option useful, IMO).
Simply change the line in search.php that says:
to:
This restores the behavior of putting pages that match all the search terms on top, even with "substring match..." on. In the standard behavior, pages with many variations on one substring would beat pages that match all the substrings once, which is rarely what you want.
Note:
This may very well mess up the ranking if "Substring match for all searches" is not on. And maybe cause other problems. I take no responsibility . We never had this conversation.
This is very useful when "Substring match for all searches" is on (practically makes that option useful, IMO).
Simply change the line in search.php that says:
PHP Code:
$output[$oline][2] = $res_table[$i][1]; // num of sw matched
PHP Code:
$output[$oline][2] = $res_table[$i][5]; // num of actual sw matched
Note:
This may very well mess up the ranking if "Substring match for all searches" is not on. And maybe cause other problems. I take no responsibility . We never had this conversation.