2 Feature: Search queries
3 Generic search result correctness
5 Scenario: House number search for non-street address
6 When sending json search query "6 Silum, Liechtenstein" with address
9 Then address of result 0 is
13 | town | Triesenberg |
16 | country | Liechtenstein |
18 | ISO3166-2-lvl8 | LI-10 |
20 Scenario: House number interpolation
21 When sending json search query "Grosssteg 1023, Triesenberg" with address
24 Then address of result 0 contains
26 | house_number | 1023 |
30 | town | Triesenberg |
31 | country | Liechtenstein |
34 Scenario: With missing housenumber search falls back to road
35 When sending json search query "Bündaweg 555" with address
36 Then address of result 0 is
42 | town | Triesenberg |
43 | country | Liechtenstein |
45 | ISO3166-2-lvl8 | LI-10 |
47 Scenario Outline: Housenumber 0 can be found
48 When sending <format> search query "Gnalpstrasse 0" with address
52 And result addresses contain
64 Scenario: TIGER house number
65 When sending json search query "697 Upper Kingston Road"
67 | osm_type | display_name |
70 Scenario: Search with class-type feature
71 When sending jsonv2 search query "bars in ebenholz"
76 Scenario: Search with specific amenity
77 When sending json search query "[restaurant] Vaduz" with address
78 Then result addresses contain
83 | amenity | restaurant |
85 Scenario: Search with specific amenity also work in country
86 When sending json search query "restaurants in liechtenstein" with address
87 Then result addresses contain
92 | amenity | restaurant |
94 Scenario: Search with key-value amenity
95 When sending json search query "[club=scout] Vaduz"
101 Scenario: With multiple amenity search only the first is used
102 When sending json search query "[club=scout] [church] vaduz"
106 When sending json search query "[amenity=place_of_worship] [club=scout] vaduz"
109 | amenity | place_of_worship |
111 Scenario: POI search near given coordinate
112 When sending json search query "restaurant near 47.16712,9.51100"
115 | amenity | restaurant |
117 Scenario: Arbitrary key/value search near given coordinate
118 When sending json search query "[leisure=firepit] 47.150° N 9.5340493° E"
121 | leisure | firepit |
124 Scenario: Arbitrary key/value search near given coordinate and named place
125 When sending json search query "[leisure=firepit] ebenholz 47° 9′ 26″ N 9° 36′ 45″ E"
128 | leisure | firepit |
130 Scenario Outline: Key/value search near given coordinate can be restricted to country
131 When sending json search query "[natural=peak] 47.06512,9.53965" with address
134 Then result addresses contain
143 Scenario: Name search near given coordinate
144 When sending json search query "sporry" with address
145 Then result addresses contain
148 When sending json search query "sporry, 47.10791,9.52676" with address
149 Then result addresses contain
153 Scenario: Name search near given coordinate without result
154 When sending json search query "sporry, N 47 15 7 W 9 61 26"
155 Then exactly 0 results are returned
157 Scenario: Arbitrary key/value search near a road
158 When sending json search query "[amenity=drinking_water] Wissfläckaweg"
161 | amenity | drinking_water |
163 Scenario: Ignore other country codes in structured search with country
164 When sending json search query ""
167 Then exactly 0 results are returned
169 Scenario: Ignore country searches when query is restricted to countries
170 When sending json search query "fr"
173 Then exactly 0 results are returned
175 Scenario: Country searches only return results for the given country
176 When sending search query "Ans Trail" with address
179 Then result addresses contain
183 # https://trac.openstreetmap.org/ticket/5094
184 Scenario: housenumbers are ordered by complete match first
185 When sending json search query "Austrasse 11, Vaduz" with address
186 Then result addresses contain
187 | ID | house_number |
190 Scenario Outline: Coordinate searches with white spaces
191 When sending json search query "<data>"
192 Then exactly 1 result is returned
199 | sporry weiher, N 47.10791° E 9.52676° |
200 | sporry weiher, N 47.10791° E 9.52676° |
201 | sporry weiher , N 47.10791° E 9.52676° |
202 | sporry weiher, N 47.10791° E 9.52676° |
203 | sporry weiher
\v, N 47.10791° E 9.52676° |
205 Scenario: Searches with white spaces
206 When sending json search query "52 Bodastr
\v,
\fTriesenberg"
209 | highway | residential |
213 Scenario: Addressdetails always return the place type
214 When sending json search query "Vaduz" with address
215 Then result addresses contain
219 Scenario: Search can handle complex query word sets
220 When sending search query "aussenstelle universitat lichtenstein wachterhaus aussenstelle universitat lichtenstein wachterhaus aussenstelle universitat lichtenstein wachterhaus aussenstelle universitat lichtenstein wachterhaus"
221 Then a HTTP 200 is returned