X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/9bb81731f82be9488ae4ab8d635593317b57ed35..9d74ccf33fd6c442dcfe673169cdd046cfbe40c3:/sql/functions.sql diff --git a/sql/functions.sql b/sql/functions.sql index eb2ab5de..1c39c1fc 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 @@ -2368,7 +2370,7 @@ BEGIN CASE WHEN class = 'place' and type = 'postcode' THEN hstore('name', postcode) ELSE name END as name, CASE WHEN extratags ? 'place' THEN 'place' ELSE class END as class, CASE WHEN extratags ? 'place' THEN extratags->'place' ELSE type END as type, - admin_level, fromarea, isaddress, + admin_level, fromarea, isaddress and linked_place_id is NULL as isaddress, CASE WHEN address_place_id = for_place_id AND rank_address = 0 THEN 100 WHEN rank_address = 11 THEN 5 ELSE rank_address END as rank_address, distance,country_code,postcode from place_addressline join placex on (address_place_id = placex.place_id)