X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/d899b3b04cacff3f0b65305e426e0c839c22258d..8989776bfda86606be036f08b2b3c6ae01e98958:/sql/functions.sql

diff --git a/sql/functions.sql b/sql/functions.sql
index dc692804..bc2d6a63 100644
--- a/sql/functions.sql
+++ b/sql/functions.sql
@@ -1107,7 +1107,11 @@ BEGIN
       END IF;
     ELSEIF NEW.class = 'landuse' AND ST_GeometryType(NEW.geometry) in ('ST_Polygon','ST_MultiPolygon') THEN
       NEW.rank_search := 22;
-      NEW.rank_address := NEW.rank_search;
+      IF NEW.type in ('residential', 'farm', 'farmyard', 'industrial', 'commercial', 'allotments', 'retail') THEN
+        NEW.rank_address := NEW.rank_search;
+      ELSE
+        NEW.rank_address := 0;
+      END IF;
     ELSEIF NEW.class = 'natural' and NEW.type in ('peak','volcano','mountain_range') THEN
       NEW.rank_search := 18;
       NEW.rank_address := 0;
