From 2bcd1aa19466b6818f35befc2fbcf160e90878dc Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Wed, 25 Mar 2015 22:22:36 +0100 Subject: [PATCH] avoid calling add_location for non-addressing features --- sql/functions.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/functions.sql b/sql/functions.sql index 5f52a6a9..02cdc680 100644 --- a/sql/functions.sql +++ b/sql/functions.sql @@ -1642,7 +1642,7 @@ BEGIN -- Performance, it would be more acurate to do all the rest of the import process but it takes too long -- Just be happy with inheriting from parent road only - IF NEW.rank_search <= 25 THEN + IF NEW.rank_search <= 25 and NEW.rank_address > 0 THEN result := add_location(NEW.place_id, NEW.calculated_country_code, NEW.partition, name_vector, NEW.rank_search, NEW.rank_address, NEW.geometry); END IF; @@ -1978,7 +1978,7 @@ BEGIN -- if we have a name add this to the name search table IF NEW.name IS NOT NULL THEN - IF NEW.rank_search <= 25 THEN + IF NEW.rank_search <= 25 and NEW.rank_address > 0 THEN result := add_location(NEW.place_id, NEW.calculated_country_code, NEW.partition, name_vector, NEW.rank_search, NEW.rank_address, NEW.geometry); END IF; -- 2.39.5