]> git.openstreetmap.org Git - nominatim.git/commitdiff
reduce effect of missing world now importance is better quality
authorBrian Quinion <openstreetmap@brian.quinion.co.uk>
Sat, 25 Aug 2012 19:05:05 +0000 (20:05 +0100)
committerBrian Quinion <openstreetmap@brian.quinion.co.uk>
Sat, 25 Aug 2012 19:05:05 +0000 (20:05 +0100)
website/search.php

index 77892f238883e920549a7134a70c52832bd314c4..60df370d4ea6842e42fea75628c8c9f233aa6310 100755 (executable)
                {
                        if (stripos($sAddress, $sWord)!==false) $iCountWords++;
                }
-               $aResult['importance'] = $aResult['importance'] + $iCountWords;
+               $aResult['importance'] = $aResult['importance'] + ($iCountWords*0.1); // 0.1 is a completely arbitrary number but something in the range 0.1 to 0.5 would seem right
 
 //if (CONST_Debug) var_dump($aResult['class'].':'.$aResult['type'].':'.$aResult['admin_level']);
 /*