3 Feature: Search queries
4 Generic search result correctness
6 Scenario: Search for natural object
7 When sending json search query "Samina"
11 | ID | class | type | display_name |
12 | 0 | waterway | river | Samina, Austria |
14 Scenario: House number search for non-street address
15 When sending json search query "6 Silum, Liechtenstein" with address
18 Then address of result 0 is
22 | town | Triesenberg |
25 | country | Liechtenstein |
27 | ISO3166-2-lvl8 | LI-10 |
29 Scenario: House number interpolation
30 When sending json search query "Grosssteg 1023, Triesenberg" with address
33 Then address of result 0 contains
35 | house_number | 1023 |
39 | town | Triesenberg |
40 | country | Liechtenstein |
43 Scenario: With missing housenumber search falls back to road
44 When sending json search query "Bündaweg 555" with address
45 Then address of result 0 is
51 | town | Triesenberg |
52 | country | Liechtenstein |
54 | ISO3166-2-lvl8 | LI-10 |
56 Scenario Outline: Housenumber 0 can be found
57 When sending <format> search query "Gnalpstrasse 0" with address
61 And result addresses contain
73 Scenario: TIGER house number
74 When sending json search query "697 Upper Kingston Road"
76 | osm_type | display_name |
79 Scenario: Search with class-type feature
80 When sending jsonv2 search query "bars in ebenholz"
85 Scenario: Search with specific amenity
86 When sending json search query "[restaurant] Vaduz" with address
87 Then result addresses contain
92 | amenity | restaurant |
94 Scenario: Search with specific amenity also work in country
95 When sending json search query "restaurants in liechtenstein" with address
96 Then result addresses contain
101 | amenity | restaurant |
103 Scenario: Search with key-value amenity
104 When sending json search query "[club=scout] Vaduz"
110 Scenario: With multiple amenity search only the first is used
111 When sending json search query "[club=scout] [church] vaduz"
115 When sending json search query "[amenity=place_of_worship] [club=scout] vaduz"
118 | amenity | place_of_worship |
120 Scenario: POI search near given coordinate
121 When sending json search query "restaurant near 47.16712,9.51100"
124 | amenity | restaurant |
126 Scenario: Arbitrary key/value search near given coordinate
127 When sending json search query "[leisure=firepit] 47.150° N 9.5340493° E"
130 | leisure | firepit |
133 Scenario: Arbitrary key/value search near given coordinate and named place
134 When sending json search query "[leisure=firepit] ebenholz 47° 9′ 26″ N 9° 36′ 45″ E"
137 | leisure | firepit |
140 Scenario: POI search in a bounded viewbox
141 When sending json search query "restaurants"
142 | viewbox | bounded |
143 | 9.50830,47.15253,9.52043,47.14866 | 1 |
146 | amenity | restaurant |
148 Scenario Outline: Key/value search near given coordinate can be restricted to country
149 When sending json search query "[natural=peak] 47.06512,9.53965" with address
152 Then result addresses contain
161 Scenario: Name search near given coordinate
162 When sending json search query "sporry" with address
163 Then result addresses contain
166 When sending json search query "sporry, 47.10791,9.52676" with address
167 Then result addresses contain
171 Scenario: Name search near given coordinate without result
172 When sending json search query "sporry, N 47 15 7 W 9 61 26"
173 Then exactly 0 results are returned
175 Scenario: Arbitrary key/value search near a road
176 When sending json search query "[amenity=drinking_water] Wissfläckaweg"
179 | amenity | drinking_water |
181 Scenario: Ignore other country codes in structured search with country
182 When sending json search query ""
185 Then exactly 0 results are returned
187 Scenario: Ignore country searches when query is restricted to countries
188 When sending json search query "fr"
191 Then exactly 0 results are returned
193 Scenario: Country searches only return results for the given country
194 When sending search query "Ans Trail" with address
197 Then result addresses contain
201 # https://trac.openstreetmap.org/ticket/5094
202 Scenario: housenumbers are ordered by complete match first
203 When sending json search query "Austrasse 11, Vaduz" with address
204 Then result addresses contain
205 | ID | house_number |
208 Scenario Outline: Coordinate searches with white spaces
209 When sending json search query "<data>"
210 Then exactly 1 result is returned
217 | sporry weiher, N 47.10791° E 9.52676° |
218 | sporry weiher, N 47.10791° E 9.52676° |
219 | sporry weiher , N 47.10791° E 9.52676° |
220 | sporry weiher, N 47.10791° E 9.52676° |
221 | sporry weiher
\v, N 47.10791° E 9.52676° |
223 Scenario: Searches with white spaces
224 When sending json search query "52 Bodastr
\v,
\fTriesenberg"
227 | highway | residential |
231 Scenario: Addressdetails always return the place type
232 When sending json search query "Vaduz" with address
233 Then result addresses contain
237 Scenario: Search can handle complex query word sets
238 When sending search query "aussenstelle universitat lichtenstein wachterhaus aussenstelle universitat lichtenstein wachterhaus aussenstelle universitat lichtenstein wachterhaus aussenstelle universitat lichtenstein wachterhaus"
239 Then a HTTP 200 is returned