]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/bdd/db/import/search_name.feature
split addr: tags into words before adding to the search index
[nominatim.git] / test / bdd / db / import / search_name.feature
index 866a597da178bf021940bd44415a250795f4efd3..beae3444ee7fe4f75a7a338673c177243d359b45 100644 (file)
@@ -30,7 +30,24 @@ Feature: Creation of search terms
          | osm_type | osm_id | name |
          | N        | 1      | 23, Rose Street |
 
-    Scenario: Unnamed POI has no search entry when it has known addr: tags
+    Scenario: Searching for unknown addr: tags also works for multiple words
+        Given the scene roads-with-pois
+        And the places
+         | osm | class   | type        | housenr | addr+city        | geometry |
+         | N1  | place   | house       | 23      | Little Big Town  | :p-N1 |
+        And the places
+         | osm | class   | type        | name+name   | geometry |
+         | W1  | highway | residential | Rose Street | :w-north |
+        When importing
+        Then search_name contains
+         | object | name_vector | nameaddress_vector |
+         | N1     | #23         | Rose Street, Little, Big, Town |
+        When searching for "23 Rose Street, Little Big Town"
+        Then results contain
+         | osm_type | osm_id | name |
+         | N        | 1      | 23, Rose Street |
+
+     Scenario: Unnamed POI has no search entry when it has known addr: tags
         Given the scene roads-with-pois
         And the places
          | osm | class   | type        | housenr | addr+city | geometry |
@@ -197,7 +214,7 @@ Feature: Creation of search terms
         When importing
         Then search_name contains
          | object | nameaddress_vector |
-         | W1     | bonn, new york, smalltown |
+         | W1     | bonn, new, york, smalltown |
 
     Scenario: A known addr:* tag is added even if the name is unknown
         Given the scene roads-with-pois