mirror of
https://github.com/osm-search/Nominatim.git
synced 2025-01-08 22:49:15 +03:00
make sure first of each address rank is used
get_addressdata should not really return duplicates but if there are the first result will be the best one, so make sure that one is used
This commit is contained in:
parent
55b59ea139
commit
8e004dca44
@ -2178,7 +2178,7 @@ BEGIN
|
||||
|
||||
FOR location IN select * from get_addressdata(for_place_id) where isaddress order by rank_address desc LOOP
|
||||
currresult := trim(get_name_by_language(location.name, languagepref));
|
||||
IF currresult != prevresult AND currresult IS NOT NULL THEN
|
||||
IF currresult != prevresult AND currresult IS NOT NULL AND result[(100 - location.rank_address)] IS NULL THEN
|
||||
result[(100 - location.rank_address)] := trim(get_name_by_language(location.name, languagepref));
|
||||
prevresult := currresult;
|
||||
END IF;
|
||||
|
Loading…
Reference in New Issue
Block a user