From a4f1e40b721a597018e60ec743d190e4fa65bd81 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Mon, 23 Nov 2020 19:55:36 +0100 Subject: [PATCH] do not create POI search terms on reverse-only Fixes #2067. --- sql/functions/placex_triggers.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sql/functions/placex_triggers.sql b/sql/functions/placex_triggers.sql index 7d6352b4..6fd9e225 100644 --- a/sql/functions/placex_triggers.sql +++ b/sql/functions/placex_triggers.sql @@ -814,8 +814,8 @@ BEGIN END IF; - IF array_length(name_vector, 1) is not NULL - OR inherited_address is not NULL OR NEW.address is not NULL + IF not %REVERSE-ONLY% AND (array_length(name_vector, 1) is not NULL + OR inherited_address is not NULL OR NEW.address is not NULL) THEN SELECT * INTO name_vector, nameaddress_vector FROM create_poi_search_terms(NEW.place_id, @@ -824,7 +824,7 @@ BEGIN NEW.country_code, NEW.housenumber, name_vector, NEW.centroid); - IF not %REVERSE-ONLY% AND array_length(name_vector, 1) is not NULL THEN + IF array_length(name_vector, 1) is not NULL THEN INSERT INTO search_name (place_id, search_rank, address_rank, importance, country_code, name_vector, nameaddress_vector, centroid) -- 2.39.5