X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/987d60ccdaa750defcd09ce64f19e3e049222802..67c995aef63d25ed343d7c85efbcfa0f62d10725:/sql/functions/placex_triggers.sql diff --git a/sql/functions/placex_triggers.sql b/sql/functions/placex_triggers.sql index ea9474e4..87f15e8c 100644 --- a/sql/functions/placex_triggers.sql +++ b/sql/functions/placex_triggers.sql @@ -97,7 +97,7 @@ BEGIN -- Instead simply use the containing area with the largest rank. FOR location IN SELECT place_id FROM placex - WHERE bbox @ geometry AND _ST_Covers(geometry, ST_Centroid(bbox)) + WHERE bbox && geometry AND _ST_Covers(geometry, ST_Centroid(bbox)) AND rank_address between 5 and 25 ORDER BY rank_address desc LOOP @@ -112,7 +112,7 @@ BEGIN -- contains the bbox, only use addressable features FOR location IN SELECT place_id FROM placex - WHERE bbox @ geometry AND _ST_Covers(geometry, ST_Centroid(bbox)) + WHERE bbox && geometry AND _ST_Covers(geometry, ST_Centroid(bbox)) AND rank_address between 5 and 25 ORDER BY rank_address desc LOOP