X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/0ab547793d51e68345537b4c12dccc75d8b95450..f1cbca788531e9eefe5fbbadd7ac0d218f6aa076:/lib/lib.php diff --git a/lib/lib.php b/lib/lib.php index 1e05def3..b54023a4 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);