Re: Search problem on no2.php.net

From: Date: Sun, 10 Jul 2005 21:00:49 +0000
Subject: Re: Search problem on no2.php.net
References: 1 2  Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-28701@lists.php.net to get a copy of this message
Gabor Hojtsy wrote:
Hi,
Someone just pointed out to me that my mirror (no2.php.net) has some search problems. If you search for "for" on my mirror you end up on /manual/en/ref.var.php, not /manual/en/control-structures.for.php as you do on other mirrors. Anyone know why this might happen? The apache config is exactly as the one noted on the mirroring-page, and I've disabled the "var"-handler (I'm running Apache 2).
Interesting... Do you have the sqlite extension set up? I researched this problem, this is what happens:
- Must be using the sqlite lookup for this to occur. It does not occur using find_manual_page_slow() - a ref.* prefix has a search priority of 0 - a control-structures.* prefix has a search priority of 4 - The lower priority the better - As you can see just from this, "ref.var" supercedes "control-structures.for", but this isn't the problem, as "var" shouldn't be matching "for" in the first place. - metaphone("var") is "FR" - metaphone("for") is "FR" - metaphone matches get a worse priority, the problem? The priority they get is +1 of their usual priority, this means: - ref.var has a search priority of 0+1=1 for the search term "for" - control-structures.for has a search priority of 4+1=5 for the search term "for" - Thus, ref.var is returned when searching for "for". To fix it, instead of doing +1 for metaphone matches, how about doing +10? Then everything that's not metaphone is returned first and metaphone becomes a last resort? More testing might be needed.
Goba
Dave


« previous php.mirrors (#28701) next »