From d04e87fb80e011126249afe335a6c646605d73b3 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sun, 13 Sep 2020 10:53:25 +0200 Subject: [PATCH 1/2] drop suport for is_in tag --- settings/import-extratags.style | 2 +- settings/import-full.style | 2 +- sql/functions/placex_triggers.sql | 17 ----------------- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/settings/import-extratags.style b/settings/import-extratags.style index b90a07b1..63c4a7ae 100644 --- a/settings/import-extratags.style +++ b/settings/import-extratags.style @@ -211,7 +211,7 @@ } }, { - "keys" : ["addr:*", "is_in:*", "tiger:county", "is_in"], + "keys" : ["addr:*", "is_in:*", "tiger:county"], "values" : { "" : "address" } diff --git a/settings/import-full.style b/settings/import-full.style index c57c2c3a..c587a45c 100644 --- a/settings/import-full.style +++ b/settings/import-full.style @@ -211,7 +211,7 @@ } }, { - "keys" : ["addr:*", "is_in:*", "tiger:county", "is_in"], + "keys" : ["addr:*", "is_in:*", "tiger:county"], "values" : { "" : "address" } diff --git a/sql/functions/placex_triggers.sql b/sql/functions/placex_triggers.sql index d6a8f762..f494b612 100644 --- a/sql/functions/placex_triggers.sql +++ b/sql/functions/placex_triggers.sql @@ -290,23 +290,6 @@ BEGIN END IF; END IF; END LOOP; - - IF address ? 'is_in' THEN - -- is_in items need splitting - isin := regexp_split_to_array(address->'is_in', E'[;,]'); - IF array_upper(isin, 1) IS NOT NULL THEN - FOR i IN 1..array_upper(isin, 1) LOOP - isin_tokens := array_merge(isin_tokens, - word_ids_from_name(isin[i])); - - -- merge word into address vector - IF NOT %REVERSE-ONLY% THEN - nameaddress_vector := array_merge(nameaddress_vector, - addr_ids_from_name(isin[i])); - END IF; - END LOOP; - END IF; - END IF; END IF; IF NOT %REVERSE-ONLY% THEN nameaddress_vector := array_merge(nameaddress_vector, isin_tokens); From 248d6b413a245beb070ee4fda5518ae0344a346e Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Tue, 22 Sep 2020 21:36:49 +0200 Subject: [PATCH 2/2] remove test for is_in --- test/bdd/db/import/search_name.feature | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/test/bdd/db/import/search_name.feature b/test/bdd/db/import/search_name.feature index 14cf3769..3fda7ae8 100644 --- a/test/bdd/db/import/search_name.feature +++ b/test/bdd/db/import/search_name.feature @@ -223,21 +223,6 @@ Feature: Creation of search terms | object | nameaddress_vector | | W1 | 12345 | - Scenario: is_in is split and added to the address search terms - Given the scene roads-with-pois - And the places - | osm | class | type | name | geometry | - | N1 | place | state | new york | 80 80 | - | N2 | place | city | bonn | 81 81 | - | N3 | place | suburb | smalltown| 80 81 | - And the named places - | osm | class | type | addr+is_in | geometry | - | W1 | highway | service | bonn, New York, Smalltown | :w-north | - When importing - Then search_name contains - | object | nameaddress_vector | - | W1 | bonn, new york, smalltown | - Scenario: a linked place does not show up in search name Given the named places | osm | class | type | admin | geometry |