]> git.openstreetmap.org Git - nominatim.git/blobdiff - sql/functions.sql
disable nonsearch as a temporary hack around trac ticket #4971
[nominatim.git] / sql / functions.sql
index 818f6ac12d96e5e6a2e8b600014dcff9f82411d6..2407db5b6b9db377cf966c8f31b58aaddb59e8d3 100644 (file)
@@ -1123,7 +1123,11 @@ BEGIN
         return NULL;
       END IF;
       NEW.rank_search := NEW.admin_level * 2;
-      NEW.rank_address := NEW.rank_search;
+      IF NEW.type = 'administrative' THEN
+        NEW.rank_address := NEW.rank_search;
+      ELSE
+        NEW.rank_address := 0;
+      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;