mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-09 19:44:07 +00:00
final result ordering, remove GB postcode hacks
This commit is contained in:
@@ -44,6 +44,8 @@
|
|||||||
return ($a['aPointPolygon']['numfeatures'] > $b['aPointPolygon']['numfeatures']?-1:1);
|
return ($a['aPointPolygon']['numfeatures'] > $b['aPointPolygon']['numfeatures']?-1:1);
|
||||||
if ($a['aPointPolygon']['area'] != $b['aPointPolygon']['area'])
|
if ($a['aPointPolygon']['area'] != $b['aPointPolygon']['area'])
|
||||||
return ($a['aPointPolygon']['area'] > $b['aPointPolygon']['area']?-1:1);
|
return ($a['aPointPolygon']['area'] > $b['aPointPolygon']['area']?-1:1);
|
||||||
|
if ($a['levenshtein'] != $b['levenshtein'])
|
||||||
|
return ($a['levenshtein'] < $b['levenshtein']?-1:1);
|
||||||
if ($a['importance'] != $b['importance'])
|
if ($a['importance'] != $b['importance'])
|
||||||
return ($a['importance'] < $b['importance']?-1:1);
|
return ($a['importance'] < $b['importance']?-1:1);
|
||||||
return ($a['foundorder'] < $b['foundorder']?-1:1);
|
return ($a['foundorder'] < $b['foundorder']?-1:1);
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
echo " osm_type='$sOSMType'";
|
echo " osm_type='$sOSMType'";
|
||||||
echo " osm_id='".$aResult['osm_id']."'";
|
echo " osm_id='".$aResult['osm_id']."'";
|
||||||
}
|
}
|
||||||
|
echo " place_rank='".$aResult['rank_search']."'";
|
||||||
|
|
||||||
if (isset($aResult['aBoundingBox']))
|
if (isset($aResult['aBoundingBox']))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -304,7 +304,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($bSuggestion) $sSuggestion = join(', ',$aSuggestion);
|
if ($bSuggestion) $sSuggestion = join(', ',$aSuggestion);
|
||||||
|
/*
|
||||||
// Try and calculate GB postcodes we might be missing
|
// Try and calculate GB postcodes we might be missing
|
||||||
foreach($aTokens as $sToken)
|
foreach($aTokens as $sToken)
|
||||||
{
|
{
|
||||||
@@ -322,7 +322,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
// Any words that have failed completely?
|
// Any words that have failed completely?
|
||||||
// TODO: suggestions
|
// TODO: suggestions
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user