]> git.openstreetmap.org Git - nominatim.git/blobdiff - sql/functions.sql
for roads add all intersecting boundaries to address list
[nominatim.git] / sql / functions.sql
index 61228c422dd129a87fd879b7e679ef34aa56531e..be67cf011d7481c2d0d3158c1906f9db22af009c 100644 (file)
@@ -1679,7 +1679,12 @@ BEGIN
   -- added ourself as address already
   address_havelevel[NEW.rank_address] := true;
   -- RAISE WARNING '  getNearFeatures(%,''%'',%,''%'')',NEW.partition, place_centroid, search_maxrank, isin_tokens;
-  FOR location IN SELECT * from getNearFeatures(NEW.partition, place_centroid, search_maxrank, isin_tokens) LOOP
+  FOR location IN
+    SELECT * from getNearFeatures(NEW.partition,
+                                  CASE WHEN NEW.rank_search >= 26 THEN NEW.geometry
+                                  ELSE place_centroid END,
+                                  search_maxrank, isin_tokens)
+  LOOP
 
 --RAISE WARNING '  AREA: %',location;