From: Sarah Hoffmann Date: Wed, 30 Oct 2013 23:02:23 +0000 (+0100) Subject: drop operator tag for most place types X-Git-Tag: deploy~564 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/4d28df265f5b11fc144846b3953f213afc3df867?ds=inline drop operator tag for most place types To great a danger that an import adds the same tag by the thousands and confuses the statistics over search_name. --- diff --git a/sql/functions.sql b/sql/functions.sql index 4c040fdc..cb4c67e8 100644 --- a/sql/functions.sql +++ b/sql/functions.sql @@ -937,6 +937,11 @@ DECLARE BEGIN --DEBUG: RAISE WARNING '% %',NEW.osm_type,NEW.osm_id; + -- remove operator tag for most places, messes too much with search_name indexes + IF NEW.class not in ('amenity', 'shop') THEN + NEW.name := delete(NEW.name, 'operator'); + END IF; + -- just block these IF NEW.class in ('landuse','natural') and NEW.name is null THEN -- RAISE WARNING 'empty landuse %',NEW.osm_id; @@ -2056,6 +2061,11 @@ BEGIN --DEBUG: RAISE WARNING '%', existingplacex; END IF; + -- remove operator tag for most places, messes too much with search_name indexes + IF NEW.class not in ('amenity', 'shop') THEN + NEW.name := delete(NEW.name, 'operator'); + END IF; + -- Just block these - lots and pointless IF NEW.class in ('landuse','natural') and NEW.name is null THEN RETURN null;