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"
109 Scenario: POI search near given coordinate
110 When sending json search query "restaurant near 47.16712,9.51100"
113 | amenity | restaurant |
115 Scenario: Arbitrary key/value search near given coordinate
116 When sending json search query "[leisure=firepit] 47.150° N 9.5340493° E"
119 | leisure | firepit |
122 Scenario: POI search in a bounded viewbox
123 When sending json search query "restaurants"
124 | viewbox | bounded |
125 | 9.50830,47.15253,9.52043,47.14866 | 1 |
128 | amenity | restaurant |
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