X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/1ccf4fb92fe71e9e2bc0baabfb2e92cd79166dae..4d28df265f5b11fc144846b3953f213afc3df867:/sql/functions.sql 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;