2 Feature: Search queries
3 Generic search result correctness
5 Scenario: Search for natural object
6 When sending json search query "Samina"
10 | ID | class | type | display_name |
11 | 0 | waterway | river | Samina, Austria |
13 Scenario: House number search for non-street address
14 When sending json search query "6 Silum, Liechtenstein" with address
17 Then address of result 0 is
21 | town | Triesenberg |
24 | country | Liechtenstein |
26 | ISO3166-2-lvl8 | LI-10 |
28 Scenario: House number interpolation
29 When sending json search query "Grosssteg 1023, Triesenberg" with address
32 Then address of result 0 contains
34 | house_number | 1023 |
38 | town | Triesenberg |
39 | country | Liechtenstein |
42 Scenario: With missing housenumber search falls back to road
43 When sending json search query "Bündaweg 555" with address
44 Then address of result 0 is
50 | town | Triesenberg |
51 | country | Liechtenstein |
53 | ISO3166-2-lvl8 | LI-10 |
55 Scenario Outline: Housenumber 0 can be found
56 When sending <format> search query "Gnalpstrasse 0" with address
60 And result addresses contain
72 Scenario: TIGER house number
73 When sending json search query "697 Upper Kingston Road"
75 | osm_type | display_name |
78 Scenario: Search with class-type feature
79 When sending jsonv2 search query "bars in ebenholz"
84 Scenario: Search with specific amenity
85 When sending json search query "[restaurant] Vaduz" with address
86 Then result addresses contain
91 | amenity | restaurant |
93 Scenario: Search with specific amenity also work in country
94 When sending json search query "restaurants in liechtenstein" with address
95 Then result addresses contain
100 | amenity | restaurant |
102 Scenario: Search with key-value amenity
103 When sending json search query "[club=scout] Vaduz"
109 Scenario: With multiple amenity search only the first is used
110 When sending json search query "[club=scout] [church] vaduz"
114 When sending json search query "[amenity=place_of_worship] [club=scout] vaduz"
117 | amenity | place_of_worship |
119 Scenario: POI search near given coordinate
120 When sending json search query "restaurant near 47.16712,9.51100"
123 | amenity | restaurant |
125 Scenario: Arbitrary key/value search near given coordinate
126 When sending json search query "[leisure=firepit] 47.150° N 9.5340493° E"
129 | leisure | firepit |
132 Scenario: Arbitrary key/value search near given coordinate and named place
133 When sending json search query "[leisure=firepit] ebenholz 47° 9′ 26″ N 9° 36′ 45″ E"
136 | leisure | firepit |
138 Scenario Outline: Key/value search near given coordinate can be restricted to country
139 When sending json search query "[natural=peak] 47.06512,9.53965" with address
142 Then result addresses contain
151 Scenario: Name search near given coordinate
152 When sending json search query "sporry" with address
153 Then result addresses contain
156 When sending json search query "sporry, 47.10791,9.52676" with address
157 Then result addresses contain
161 Scenario: Name search near given coordinate without result
162 When sending json search query "sporry, N 47 15 7 W 9 61 26"
163 Then exactly 0 results are returned
165 Scenario: Arbitrary key/value search near a road
166 When sending json search query "[amenity=drinking_water] Wissfläckaweg"
169 | amenity | drinking_water |
171 Scenario: Ignore other country codes in structured search with country
172 When sending json search query ""
175 Then exactly 0 results are returned
177 Scenario: Ignore country searches when query is restricted to countries
178 When sending json search query "fr"
181 Then exactly 0 results are returned
183 Scenario: Country searches only return results for the given country
184 When sending search query "Ans Trail" with address
187 Then result addresses contain
191 # https://trac.openstreetmap.org/ticket/5094
192 Scenario: housenumbers are ordered by complete match first
193 When sending json search query "Austrasse 11, Vaduz" with address
194 Then result addresses contain
195 | ID | house_number |
198 Scenario Outline: Coordinate searches with white spaces
199 When sending json search query "<data>"
200 Then exactly 1 result is returned
207 | sporry weiher, N 47.10791° E 9.52676° |
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
\v, N 47.10791° E 9.52676° |
213 Scenario: Searches with white spaces
214 When sending json search query "52 Bodastr
\v,
\fTriesenberg"
217 | highway | residential |
221 Scenario: Addressdetails always return the place type
222 When sending json search query "Vaduz" with address
223 Then result addresses contain
227 Scenario: Search can handle complex query word sets
228 When sending search query "aussenstelle universitat lichtenstein wachterhaus aussenstelle universitat lichtenstein wachterhaus aussenstelle universitat lichtenstein wachterhaus aussenstelle universitat lichtenstein wachterhaus"
229 Then a HTTP 200 is returned