]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/db/query/housenumbers.feature
add @fail-legacy
[nominatim.git] / test / bdd / db / query / housenumbers.feature
1 @DB
2 Feature: Searching of house numbers
3     Test for specialised treeatment of housenumbers
4
5     Background:
6         Given the grid
7          | 1 |   | 2 |   | 3 |
8          |   | 9 |   |   |   |
9          |   |   |   |   | 4 |
10
11
12     Scenario: A simple ascii digit housenumber is found
13         Given the places
14          | osm | class    | type | housenr  | geometry |
15          | N1  | building | yes  | 45       | 9        |
16         And the places
17          | osm | class   | type | name       | geometry |
18          | W10 | highway | path | North Road | 1,2,3    |
19         When importing
20         And sending search query "45, North Road"
21         Then results contain
22          | osm |
23          | N1  |
24         When sending search query "North Road 45"
25         Then results contain
26          | osm |
27          | N1  |
28
29
30     @fail-legacy
31     Scenario Outline: Numeral housenumbers in any script are found
32         Given the places
33          | osm | class    | type | housenr  | geometry |
34          | N1  | building | yes  | <number> | 9        |
35         And the places
36          | osm | class   | type | name       | geometry |
37          | W10 | highway | path | North Road | 1,2,3    |
38         When importing
39         And sending search query "45, North Road"
40         Then results contain
41          | osm |
42          | N1  |
43         When sending search query "North Road ④⑤"
44         Then results contain
45          | osm |
46          | N1  |
47         When sending search query "North Road 𑁪𑁫"
48         Then results contain
49          | osm |
50          | N1  |
51
52     Examples:
53         | number |
54         | 45     |
55         | ④⑤     |
56         | 𑁪𑁫     |
57
58
59     Scenario Outline: Each housenumber in a list is found
60         Given the places
61          | osm | class    | type | housenr | geometry |
62          | N1  | building | yes  | <hnrs>  | 9        |
63         And the places
64          | osm | class   | type | name     | geometry |
65          | W10 | highway | path | Multistr | 1,2,3    |
66         When importing
67         When sending search query "2 Multistr"
68         Then results contain
69          | osm |
70          | N1  |
71         When sending search query "4 Multistr"
72         Then results contain
73          | osm |
74          | N1  |
75         When sending search query "12 Multistr"
76         Then results contain
77          | osm |
78          | N1  |
79
80      Examples:
81         | hnrs |
82         | 2;4;12 |
83         | 2,4,12 |
84         | 2, 4, 12 |
85
86
87     @fail-legacy
88     Scenario Outline: Housenumber - letter combinations are found
89         Given the places
90          | osm | class    | type | housenr | geometry |
91          | N1  | building | yes  | <hnr>   | 9        |
92         And the places
93          | osm | class   | type | name     | geometry |
94          | W10 | highway | path | Multistr | 1,2,3    |
95         When importing
96         When sending search query "2A Multistr"
97         Then results contain
98          | osm |
99          | N1  |
100         When sending search query "2 a Multistr"
101         Then results contain
102          | osm |
103          | N1  |
104         When sending search query "2-A Multistr"
105         Then results contain
106          | osm |
107          | N1  |
108         When sending search query "Multistr 2 A"
109         Then results contain
110          | osm |
111          | N1  |
112
113     Examples:
114         | hnr |
115         | 2a  |
116         | 2 A |
117         | 2-a |
118         | 2/A |
119
120
121     Scenario Outline: Number - Number combinations as a housenumber are found
122         Given the places
123          | osm | class    | type | housenr | geometry |
124          | N1  | building | yes  | <hnr>   | 9        |
125         And the places
126          | osm | class   | type | name       | geometry |
127          | W10 | highway | path | Chester St | 1,2,3    |
128         When importing
129         When sending search query "34-10 Chester St"
130         Then results contain
131          | osm |
132          | N1  |
133         When sending search query "34/10 Chester St"
134         Then results contain
135          | osm |
136          | N1  |
137         When sending search query "34 10 Chester St"
138         Then results contain
139          | osm |
140          | N1  |
141         When sending search query "3410 Chester St"
142         Then results contain
143          | osm |
144          | W10 |
145
146     Examples:
147         | hnr   |
148         | 34-10 |
149         | 34 10 |
150         | 34/10 |
151
152
153     @fail-legacy
154     Scenario Outline: a bis housenumber is found
155         Given the places
156          | osm | class    | type | housenr | geometry |
157          | N1  | building | yes  | <hnr>   | 9        |
158         And the places
159          | osm | class   | type | name       | geometry |
160          | W10 | highway | path | Rue Paris | 1,2,3    |
161         When importing
162         When sending search query "Rue Paris 45bis"
163         Then results contain
164          | osm |
165          | N1  |
166         When sending search query "Rue Paris 45 BIS"
167         Then results contain
168          | osm |
169          | N1  |
170         When sending search query "Rue Paris 45BIS"
171         Then results contain
172          | osm |
173          | N1  |
174         When sending search query "Rue Paris 45 bis"
175         Then results contain
176          | osm |
177          | N1  |
178
179     Examples:
180         | hnr   |
181         | 45bis |
182         | 45BIS |
183         | 45 BIS |
184         | 45 bis |
185
186
187     @fail-legacy
188     Scenario Outline: a ter housenumber is found
189         Given the places
190          | osm | class    | type | housenr | geometry |
191          | N1  | building | yes  | <hnr>   | 9        |
192         And the places
193          | osm | class   | type | name       | geometry |
194          | W10 | highway | path | Rue du Berger | 1,2,3    |
195         When importing
196         When sending search query "Rue du Berger 45ter"
197         Then results contain
198          | osm |
199          | N1  |
200         When sending search query "Rue du Berger 45 TER"
201         Then results contain
202          | osm |
203          | N1  |
204         When sending search query "Rue du Berger 45TER"
205         Then results contain
206          | osm |
207          | N1  |
208         When sending search query "Rue du Berger 45 ter"
209         Then results contain
210          | osm |
211          | N1  |
212
213     Examples:
214         | hnr   |
215         | 45ter |
216         | 45TER |
217         | 45 ter |
218         | 45 TER |
219
220
221     @fail-legacy
222     Scenario Outline: a number - letter - number combination housenumber is found
223         Given the places
224          | osm | class    | type | housenr | geometry |
225          | N1  | building | yes  | <hnr>   | 9        |
226         And the places
227          | osm | class   | type | name       | geometry |
228          | W10 | highway | path | Herengracht | 1,2,3    |
229         When importing
230         When sending search query "501-H 1 Herengracht"
231         Then results contain
232          | osm |
233          | N1  |
234         When sending search query "501H-1 Herengracht"
235         Then results contain
236          | osm |
237          | N1  |
238         When sending search query "501H1 Herengracht"
239         Then results contain
240          | osm |
241          | N1  |
242         When sending search query "501-H1 Herengracht"
243         Then results contain
244          | osm |
245          | N1  |
246
247     Examples:
248         | hnr |
249         | 501 H1 |
250         | 501H 1 |
251         | 501/H/1 |
252         | 501h1 |
253
254
255     @fail-legacy
256     Scenario Outline: Russian housenumbers are found
257         Given the places
258          | osm | class    | type | housenr | geometry |
259          | N1  | building | yes  | <hnr>   | 9        |
260         And the places
261          | osm | class   | type | name       | geometry |
262          | W10 | highway | path | Голубинская улица | 1,2,3    |
263         When importing
264         When sending search query "Голубинская улица 55к3"
265         Then results contain
266          | osm |
267          | N1  |
268         When sending search query "Голубинская улица 55 k3"
269         Then results contain
270          | osm |
271          | N1  |
272         When sending search query "Голубинская улица 55 к-3"
273         Then results contain
274          | osm |
275          | N1  |
276
277     Examples:
278         | hnr |
279         | 55к3 |
280         | 55 к3 |
281
282
283     Scenario: A name mapped as a housenumber is found
284         Given the places
285          | osm | class    | type | housenr | geometry |
286          | N1  | building | yes  | Warring | 9        |
287         And the places
288          | osm | class   | type | name       | geometry |
289          | W10 | highway | path | Chester St | 1,2,3    |
290         When importing
291         When sending search query "Chester St Warring"
292         Then results contain
293          | osm |
294          | N1  |
295
296
297     Scenario: Interpolations are found according to their type
298         Given the grid
299          | 10  |  | 11  |
300          | 100 |  | 101 |
301          | 20  |  | 21  |
302         And the places
303          | osm  | class   | type        | name    | geometry |
304          | W100 | highway | residential | Ringstr | 100, 101 |
305         And the places
306          | osm | class | type   | addr+interpolation | geometry |
307          | W10 | place | houses | even               | 10, 11   |
308          | W20 | place | houses | odd                | 20, 21   |
309         And the places
310          | osm | class | type  | housenr | geometry |
311          | N10 | place | house | 10      | 10 |
312          | N11 | place | house | 20      | 11 |
313          | N20 | place | house | 11      | 20 |
314          | N21 | place | house | 21      | 21 |
315         And the ways
316          | id | nodes |
317          | 10 | 10, 11 |
318          | 20 | 20, 21 |
319         When importing
320         When sending search query "Ringstr 12"
321         Then results contain
322          | osm |
323          | W10 |
324         When sending search query "Ringstr 13"
325         Then results contain
326          | osm |
327          | W20 |