X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/ed65ad2f5abc5915c6b6ce4e8fdb876979cf151b..5864fddb537a845e0281a433f00413dde9d70a08:/lib/lib.php diff --git a/lib/lib.php b/lib/lib.php index 07d5bcf3..12f7e57e 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); }