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"
100 Scenario: With multiple amenity search only the first is used
101 When sending json search query "[club=scout] [church] vaduz"
105 When sending json search query "[amenity=place_of_worship] [club=scout] vaduz"
108 | amenity | place_of_worship |
110 Scenario: POI search near given coordinate
111 When sending json search query "restaurant near 47.16712,9.51100"
114 | amenity | restaurant |
116 Scenario: Arbitrary key/value search near given coordinate
117 When sending json search query "[leisure=firepit] 47.150° N 9.5340493° E"
120 | leisure | firepit |
122 Scenario: Arbitrary key/value search near given coordinate and named place
123 When sending json search query "[leisure=firepit] ebenholz 47° 9′ 26″ N 9° 36′ 45″ E"
126 | leisure | firepit |
128 Scenario Outline: Key/value search near given coordinate can be restricted to country
129 When sending json search query "[natural=peak] 47.06512,9.53965" with address
132 Then result addresses contain
141 Scenario: Name search near given coordinate
142 When sending json search query "sporry" with address
143 Then result addresses contain
146 When sending json search query "sporry, 47.10791,9.52676" with address
147 Then result addresses contain
151 Scenario: Name search near given coordinate without result
152 When sending json search query "sporry, N 47 15 7 W 9 61 26"
153 Then exactly 0 results are returned
155 Scenario: Arbitrary key/value search near a road
156 When sending json search query "[amenity=drinking_water] Wissfläckaweg"
159 | amenity | drinking_water |
161 Scenario: Ignore other country codes in structured search with country
162 When sending json search query ""
165 Then exactly 0 results are returned
167 Scenario: Ignore country searches when query is restricted to countries
168 When sending json search query "fr"
171 Then exactly 0 results are returned
173 Scenario: Country searches only return results for the given country
174 When sending search query "Ans Trail" with address
177 Then result addresses contain
181 # https://trac.openstreetmap.org/ticket/5094
182 Scenario: housenumbers are ordered by complete match first
183 When sending json search query "Austrasse 11, Vaduz" with address
184 Then result addresses contain
185 | ID | house_number |
189 Scenario Outline: Coordinate searches with white spaces
190 When sending json search query "<data>"
191 Then exactly 1 result is returned
198 | sporry weiher, N 47.10791° E 9.52676° |
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
\v, N 47.10791° E 9.52676° |
204 Scenario: Searches with white spaces
205 When sending json search query "52 Bodastr
\v,
\fTriesenberg"
208 | highway | residential |
212 Scenario: Addressdetails always return the place type
213 When sending json search query "Vaduz" with address
214 Then result addresses contain
218 Scenario: Search can handle complex query word sets
219 When sending search query "aussenstelle universitat lichtenstein wachterhaus aussenstelle universitat lichtenstein wachterhaus aussenstelle universitat lichtenstein wachterhaus aussenstelle universitat lichtenstein wachterhaus"
220 Then a HTTP 200 is returned