X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/fcc731dcd4ba1bf7397712b614b41b90bc88436a..c03ae560e33b17f8623578c572a7b096c2311008:/lib/lib.php diff --git a/lib/lib.php b/lib/lib.php index d3b88711..a7584b37 100644 --- a/lib/lib.php +++ b/lib/lib.php @@ -94,7 +94,8 @@ function bySearchRank($a, $b) { - if ($a['iSearchRank'] == $b['iSearchRank']) return 0; + if ($a['iSearchRank'] == $b['iSearchRank']) + return strlen($a['sOperator']) + strlen($a['sHouseNumber']) - strlen($b['sOperator']) - strlen($b['sHouseNumber']); return ($a['iSearchRank'] < $b['iSearchRank']?-1:1); } @@ -177,7 +178,7 @@ { $aResult = array(array(join(' ',$aWords))); $sFirstToken = ''; - if ($iDepth < 8) { + if ($iDepth < 7) { while(sizeof($aWords) > 1) { $sWord = array_shift($aWords);