mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00: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:
@@ -2178,7 +2178,7 @@ BEGIN
|
|||||||
|
|
||||||
FOR location IN select * from get_addressdata(for_place_id) where isaddress order by rank_address desc LOOP
|
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));
|
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));
|
result[(100 - location.rank_address)] := trim(get_name_by_language(location.name, languagepref));
|
||||||
prevresult := currresult;
|
prevresult := currresult;
|
||||||
END IF;
|
END IF;
|
||||||
|
|||||||
Reference in New Issue
Block a user