X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/a178a628770894bcdf498a9768d94091b5c8f7c5..6b1f2cb2bc9771f2c65ff3f44855e6bfdf778d90:/lib/lib.php?ds=sidebyside diff --git a/lib/lib.php b/lib/lib.php index afcc02ef..b26038d8 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);