mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
ensure that result object name is always first in display_name
The display name might be mixed up if the result object has a lower rank_address than its address members.
This commit is contained in:
@@ -60,7 +60,9 @@ BEGIN
|
|||||||
prevresult := '';
|
prevresult := '';
|
||||||
|
|
||||||
FOR location IN
|
FOR location IN
|
||||||
SELECT * FROM get_addressdata(for_place_id, housenumber)
|
SELECT name,
|
||||||
|
CASE WHEN place_id = for_place_id THEN 99 ELSE rank_address END as rank_address
|
||||||
|
FROM get_addressdata(for_place_id, housenumber)
|
||||||
WHERE isaddress order by rank_address desc
|
WHERE isaddress order by rank_address desc
|
||||||
LOOP
|
LOOP
|
||||||
currresult := trim(get_name_by_language(location.name, languagepref));
|
currresult := trim(get_name_by_language(location.name, languagepref));
|
||||||
|
|||||||
Reference in New Issue
Block a user