X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/c7472662a69eb6074a58917dbde71cf2b27e8d6e..cca646a19e8013f39911a5c4faaaa15b89ce083f:/sql/functions/ranking.sql diff --git a/sql/functions/ranking.sql b/sql/functions/ranking.sql index 51dcd0d0..1f236211 100644 --- a/sql/functions/ranking.sql +++ b/sql/functions/ranking.sql @@ -194,10 +194,10 @@ BEGIN FROM get_postcode_rank(country, postcode); ELSEIF extended_type = 'N' AND place_class = 'highway' THEN search_rank = 30; - address_rank = 0; + address_rank = 30; ELSEIF place_class = 'landuse' AND extended_type != 'A' THEN search_rank = 30; - address_rank = 0; + address_rank = 30; ELSE IF place_class = 'boundary' and place_type = 'administrative' THEN classtype = place_type || admin_level::TEXT; @@ -211,11 +211,8 @@ BEGIN AND l.class = place_class AND (l.type = classtype or l.type is NULL) ORDER BY l.country_code, l.class, l.type LIMIT 1; - IF search_rank is NULL THEN + IF search_rank is NULL OR address_rank is NULL THEN search_rank := 30; - END IF; - - IF address_rank is NULL THEN address_rank := 30; END IF;