X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/29e9683293180c980d040fed9f0c065db1250411..1e30e578e0b8e51d64a9409086cb8b1a1d43643b:/sql/functions.sql

diff --git a/sql/functions.sql b/sql/functions.sql
index eb2ab5de..f4be01e2 100644
--- a/sql/functions.sql
+++ b/sql/functions.sql
@@ -1692,8 +1692,10 @@ BEGIN
   -- RAISE WARNING '  getNearFeatures(%,''%'',%,''%'')',NEW.partition, place_centroid, search_maxrank, isin_tokens;
   FOR location IN
     SELECT * from getNearFeatures(NEW.partition,
-                                  CASE WHEN NEW.rank_search >= 26 THEN NEW.geometry
-                                  ELSE place_centroid END,
+                                  CASE WHEN NEW.rank_search >= 26
+                                             AND NEW.rank_search < 30
+                                       THEN NEW.geometry
+                                       ELSE place_centroid END,
                                   search_maxrank, isin_tokens)
   LOOP
 
