From: Sarah Hoffmann Date: Mon, 1 Jul 2019 20:34:17 +0000 (+0200) Subject: Merge remote-tracking branch 'upstream/master' X-Git-Tag: deploy~281 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/b522ea6dc77f39132d6ab4b288fb18c25d2104c0?ds=inline;hp=-c Merge remote-tracking branch 'upstream/master' --- b522ea6dc77f39132d6ab4b288fb18c25d2104c0 diff --combined sql/functions.sql index 75ccfd68,0cfeaf0c..97f78d24 --- a/sql/functions.sql +++ b/sql/functions.sql @@@ -887,11 -887,7 +887,7 @@@ BEGI END IF; -- some postcorrections - IF NEW.class = 'place' THEN - IF NEW.type in ('continent', 'sea', 'country', 'state') AND NEW.osm_type = 'N' THEN - NEW.rank_address := 0; - END IF; - ELSEIF NEW.class = 'waterway' AND NEW.osm_type = 'R' THEN + IF NEW.class = 'waterway' AND NEW.osm_type = 'R' THEN -- Slightly promote waterway relations so that they are processed -- before their members. NEW.rank_search := NEW.rank_search - 1; @@@ -908,11 -904,6 +904,6 @@@ NEW.country_code := NULL; END IF; - -- Block import below rank 22 - -- IF NEW.rank_search > 22 THEN - -- RETURN NULL; - -- END IF; - --DEBUG: RAISE WARNING 'placex_insert:END: % % % %',NEW.osm_type,NEW.osm_id,NEW.class,NEW.type; RETURN NEW; -- %DIFFUPDATES% The following is not needed until doing diff updates, and slows the main index process down @@@ -2430,7 -2421,7 +2421,7 @@@ BEGI SELECT placex.place_id, osm_type, osm_id, 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 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)