]> git.openstreetmap.org Git - nominatim.git/commitdiff
remove comma as name separator
authorSarah Hoffmann <lonvia@denofr.de>
Sun, 22 Jan 2023 20:10:12 +0000 (21:10 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Sun, 22 Jan 2023 21:29:36 +0000 (22:29 +0100)
Commas are most of the time used as a part of a name, not to
separate multiple names.

See also #2950.

settings/icu_tokenizer.yaml
test/bdd/db/import/search_name.feature

index f30578a2322859ce287915a4049092f50eb3057a..1fa467befebfa4c5977103d6731064dd760791ff 100644 (file)
@@ -38,6 +38,7 @@ sanitizers:
       default-pattern: "[A-Z0-9- ]{3,12}"
     - step: clean-tiger-tags
     - step: split-name-list
+      delimiters: ;
     - step: strip-brace-terms
     - step: tag-analyzer-by-language
       filter-kind: [".*name.*"]
index 7c75ca4966c497d639ce2f927f3b2772c651d825..538bcbb3856abd19bf80ff922d9f5008baab67b2 100644 (file)
@@ -2,21 +2,26 @@
 Feature: Creation of search terms
     Tests that search_name table is filled correctly
 
-    Scenario Outline: Comma- and semicolon separated names appear as full names
+    Scenario: Semicolon-separated names appear as separate full names
         Given the places
          | osm | class   | type | name+alt_name |
-         | N1  | place   | city | New York<sep>Big Apple |
+         | N1  | place   | city | New YorkBig Apple |
         When importing
         Then search_name contains
          | object | name_vector |
          | N1     | #New York, #Big Apple |
 
-    Examples:
-         | sep |
-         | ,   |
-         | ;   |
+    @fail-legacy
+    Scenario: Comma-separated names appear as a single full name
+        Given the places
+         | osm | class   | type | name+alt_name |
+         | N1  | place   | city | New York, Big Apple |
+        When importing
+        Then search_name contains
+         | object | name_vector |
+         | N1     | #New York Big Apple |
 
-    Scenario Outline: Name parts before brackets appear as full names
+    Scenario: Name parts before brackets appear as full names
         Given the places
          | osm | class   | type | name+name |
          | N1  | place   | city | Halle (Saale) |