]> git.openstreetmap.org Git - nominatim.git/commitdiff
drop operator tag for most place types
authorSarah Hoffmann <lonvia@denofr.de>
Wed, 30 Oct 2013 23:02:23 +0000 (00:02 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Wed, 30 Oct 2013 23:02:23 +0000 (00:02 +0100)
To great a danger that an import adds the same tag by the
thousands and confuses the statistics over search_name.

sql/functions.sql

index 4c040fdceb4b4157f9d67c8ab998d68076d2da14..cb4c67e8d8c2525a127f880aa8c7c881bf47f2ed 100644 (file)
@@ -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;