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 |
139 Scenario Outline: Key/value search near given coordinate can be restricted to country
140 When sending json search query "[natural=peak] 47.06512,9.53965" with address
143 Then result addresses contain
152 Scenario: Name search near given coordinate
153 When sending json search query "sporry" with address
154 Then result addresses contain
157 When sending json search query "sporry, 47.10791,9.52676" with address
158 Then result addresses contain
162 Scenario: Name search near given coordinate without result
163 When sending json search query "sporry, N 47 15 7 W 9 61 26"
164 Then exactly 0 results are returned
166 Scenario: Arbitrary key/value search near a road
167 When sending json search query "[amenity=drinking_water] Wissfläckaweg"
170 | amenity | drinking_water |
172 Scenario: Ignore other country codes in structured search with country
173 When sending json search query ""
176 Then exactly 0 results are returned
178 Scenario: Ignore country searches when query is restricted to countries
179 When sending json search query "fr"
182 Then exactly 0 results are returned
184 Scenario: Country searches only return results for the given country
185 When sending search query "Ans Trail" with address
188 Then result addresses contain
192 # https://trac.openstreetmap.org/ticket/5094
193 Scenario: housenumbers are ordered by complete match first
194 When sending json search query "Austrasse 11, Vaduz" with address
195 Then result addresses contain
196 | ID | house_number |
199 Scenario Outline: Coordinate searches with white spaces
200 When sending json search query "<data>"
201 Then exactly 1 result is returned
208 | sporry weiher, N 47.10791° E 9.52676° |
209 | sporry weiher, N 47.10791° E 9.52676° |
210 | sporry weiher , N 47.10791° E 9.52676° |
211 | sporry weiher, N 47.10791° E 9.52676° |
212 | sporry weiher
\v, N 47.10791° E 9.52676° |
214 Scenario: Searches with white spaces
215 When sending json search query "52 Bodastr
\v,
\fTriesenberg"
218 | highway | residential |
222 Scenario: Addressdetails always return the place type
223 When sending json search query "Vaduz" with address
224 Then result addresses contain
228 Scenario: Search can handle complex query word sets
229 When sending search query "aussenstelle universitat lichtenstein wachterhaus aussenstelle universitat lichtenstein wachterhaus aussenstelle universitat lichtenstein wachterhaus aussenstelle universitat lichtenstein wachterhaus"
230 Then a HTTP 200 is returned