2 Feature: Creation of search terms
3 Tests that search_name table is filled correctly
5 Scenario: POIs without a name have no search entry
6 Given the scene roads-with-pois
8 | osm | class | type | geometry |
9 | N1 | place | house | :p-N1 |
11 | osm | class | type | geometry |
12 | W1 | highway | residential | :w-north |
14 Then search_name has no entry for N1
16 Scenario: Named POIs inherit address from parent
17 Given the scene roads-with-pois
19 | osm | class | type | name | geometry |
20 | N1 | place | house | foo | :p-N1 |
21 | W1 | highway | residential | the road | :w-north |
23 Then search_name contains
24 | object | name_vector | nameaddress_vector |
25 | N1 | foo | the road |
27 Scenario: Some addr: tags are added to address when the name exists
28 Given the scene roads-with-pois
30 | osm | class | type | name | geometry |
31 | N1 | place | state | new york | 80 80 |
32 | N2 | place | city | bonn | 81 81 |
33 | N3 | place | suburb | smalltown| 80 81 |
35 | osm | class | type | addr+city | addr+state | addr+suburb | geometry |
36 | W1 | highway | service | bonn | New York | Smalltown | :w-north |
38 Then search_name contains
39 | object | nameaddress_vector |
40 | W1 | bonn, new york, smalltown |
42 Scenario: A known addr:* tag is not added if the name is unknown
43 Given the scene roads-with-pois
45 | osm | class | type | name | addr+city | geometry |
46 | W1 | highway | residential | Road | Nandu | :w-north |
48 Then search_name contains not
49 | object | nameaddress_vector |
52 Scenario: addr:postcode is not added to the address terms
53 Given the scene roads-with-pois
55 | osm | class | type | name+ref | geometry |
56 | N1 | place | state | 12345 | 80 80 |
58 | osm | class | type | addr+postcode | geometry |
59 | W1 | highway | residential | 12345 | :w-north |
61 Then search_name contains not
62 | object | nameaddress_vector |
65 Scenario: is_in is split and added to the address search terms
66 Given the scene roads-with-pois
68 | osm | class | type | name | geometry |
69 | N1 | place | state | new york | 80 80 |
70 | N2 | place | city | bonn | 81 81 |
71 | N3 | place | suburb | smalltown| 80 81 |
73 | osm | class | type | addr+is_in | geometry |
74 | W1 | highway | service | bonn, New York, Smalltown | :w-north |
76 Then search_name contains
77 | object | nameaddress_vector |
78 | W1 | bonn, new york, smalltown |