X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/92095c9247ebfeb08ea1bcaebbae66ee406ce426..b6acd24e5abb3cb2fb871c75664f0540fe3102dc:/sql/functions.sql

diff --git a/sql/functions.sql b/sql/functions.sql
index dc5c754b..949e4cae 100644
--- a/sql/functions.sql
+++ b/sql/functions.sql
@@ -2343,7 +2343,7 @@ BEGIN
 
   IF for_place_id IS NULL THEN
     select parent_place_id, calculated_country_code, housenumber, rank_search, postcode, name, class, type from placex 
-      WHERE place_id = in_place_id and rank_address = 30 
+      WHERE place_id = in_place_id and  rank_search > 27
       INTO for_place_id, searchcountrycode, searchhousenumber, searchrankaddress, searchpostcode, searchhousename, searchclass, searchtype;
   END IF;
 
