X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/3c6035054f89b03963fb8f5f38310e7f92bfbbe8..0c7875ebe4299ea80b862b23490a71c814786e50:/sql/functions.sql diff --git a/sql/functions.sql b/sql/functions.sql index 8e5a63f4..929e5376 100644 --- a/sql/functions.sql +++ b/sql/functions.sql @@ -1094,10 +1094,10 @@ BEGIN ELSEIF NEW.type in ('national_park') THEN NEW.rank_search := 18; NEW.rank_address := 18; - ELSEIF NEW.type in ('suburb','croft','subdivision') THEN + ELSEIF NEW.type in ('suburb','croft','subdivision','isolated_dwelling') THEN NEW.rank_search := 20; NEW.rank_address := NEW.rank_search; - ELSEIF NEW.type in ('farm','locality','islet','isolated_dwelling','mountain_pass') THEN + ELSEIF NEW.type in ('farm','locality','islet','mountain_pass') THEN NEW.rank_search := 20; NEW.rank_address := 0; -- Irish townlands, tagged as place=locality and locality=townland @@ -1689,6 +1689,11 @@ BEGIN END IF; END IF; + END IF; + + -- Name searches can be done for ways as well as relations + IF NEW.osm_type in ('W','R') AND NEW.rank_search < 26 THEN + -- not found one yet? how about doing a name search IF NEW.centroid IS NULL AND (NEW.name->'name') is not null and make_standard_name(NEW.name->'name') != '' THEN