X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/76a83b91d7946a38c3757e21d7906d437b9dea49..e3f90f8dcf417b89ef25c5b2c16815821bf12528:/sql/functions.sql

diff --git a/sql/functions.sql b/sql/functions.sql
index 79ba1a40..e6ea4e8d 100644
--- a/sql/functions.sql
+++ b/sql/functions.sql
@@ -1104,6 +1104,11 @@ BEGIN
     ELSEIF NEW.class = 'natural' and NEW.type in ('peak','volcano','mountain_range') THEN
       NEW.rank_search := 18;
       NEW.rank_address := 0;
+    ELSEIF NEW.class = 'natural' and NEW.type = 'sea' THEN
+      NEW.rank_search := 4;
+      NEW.rank_address := NEW.rank_search;
+    ELSEIF NEW.class = 'natural' and NEW.type in ('coastline') THEN
+      RETURN NULL;
     -- any feature more than 5 square miles is probably worth indexing
     ELSEIF ST_GeometryType(NEW.geometry) in ('ST_Polygon','ST_MultiPolygon') AND ST_Area(NEW.geometry) > 0.1 THEN
       NEW.rank_search := 22;
@@ -1125,11 +1130,6 @@ BEGIN
     ELSEIF NEW.class = 'highway' AND NEW.osm_type != 'N' THEN
       NEW.rank_search := 26;
       NEW.rank_address := NEW.rank_search;
-    ELSEIF NEW.class = 'natural' and NEW.type = 'sea' THEN
-      NEW.rank_search := 4;
-      NEW.rank_address := NEW.rank_search;
-    ELSEIF NEW.class = 'natural' and NEW.type in ('coastline') THEN
-      RETURN NULL;
     ELSEIF NEW.class = 'mountain_pass' THEN
         NEW.rank_search := 20;
         NEW.rank_address := 0;
