From 4d28df265f5b11fc144846b3953f213afc3df867 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Thu, 31 Oct 2013 00:02:23 +0100 Subject: [PATCH] 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. --- sql/functions.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) 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; -- 2.39.5