experimental ordering of searches within same rank

giving preference to those without operator and housenumber
This commit is contained in:
Sarah Hoffmann
2014-05-01 10:34:42 +02:00
parent a27bf64a55
commit 0b545ba093

View File

@@ -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);
}