mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
calculate search position based to 'importance' rather than address rank
This commit is contained in:
@@ -40,6 +40,9 @@
|
||||
|
||||
function byImportance($a, $b)
|
||||
{
|
||||
/*
|
||||
if ($a['importance'] != $b['importance'])
|
||||
return ($a['importance'] > $b['importance']?-1:1);
|
||||
if ($a['aPointPolygon']['numfeatures'] != $b['aPointPolygon']['numfeatures'])
|
||||
return ($a['aPointPolygon']['numfeatures'] > $b['aPointPolygon']['numfeatures']?-1:1);
|
||||
if ($a['aPointPolygon']['area'] != $b['aPointPolygon']['area'])
|
||||
@@ -48,8 +51,7 @@
|
||||
// return ($a['levenshtein'] < $b['levenshtein']?-1:1);
|
||||
if ($a['rank_search'] != $b['rank_search'])
|
||||
return ($a['rank_search'] < $b['rank_search']?-1:1);
|
||||
if ($a['importance'] != $b['importance'])
|
||||
return ($a['importance'] < $b['importance']?-1:1);
|
||||
*/
|
||||
return ($a['foundorder'] < $b['foundorder']?-1:1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user