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 |
19 Scenario: House number interpolation
20 When sending json search query "Grosssteg 1023, Triesenberg" with address
23 Then address of result 0 contains
25 | house_number | 1023 |
29 | town | Triesenberg |
30 | country | Liechtenstein |
33 Scenario: With missing housenumber search falls back to road
34 When sending json search query "Bündaweg 555" with address
35 Then address of result 0 is
41 | town | Triesenberg |
42 | country | Liechtenstein |
45 Scenario Outline: Housenumber 0 can be found
46 When sending <format> search query "Gnalpstrasse 0" with address
50 And result addresses contain
62 Scenario: TIGER house number
63 When sending json search query "697 Upper Kingston Road"
65 | osm_type | display_name |
68 Scenario: Search with class-type feature
69 When sending jsonv2 search query "Hotel in California"
74 Scenario: Search with specific amenity
75 When sending json search query "[restaurant] Vaduz" with address
76 Then result addresses contain
81 | amenity | restaurant |
83 Scenario: Search with specific amenity also work in country
84 When sending json search query "restaurants in liechtenstein" with address
85 Then result addresses contain
90 | amenity | restaurant |
92 Scenario: Search with key-value amenity
93 When sending json search query "[club=scout] Vaduz"
98 Scenario: With multiple amenity search only the first is used
99 When sending json search query "[club=scout] [church] vaduz"
103 When sending json search query "[amenity=place_of_worship] [club=scout] vaduz"
106 | amenity | place_of_worship |
108 Scenario: POI search near given coordinate
109 When sending json search query "restaurant near 47.16712,9.51100"
112 | amenity | restaurant |
114 Scenario: Arbitrary key/value search near given coordinate
115 When sending json search query "[leisure=firepit] 47.150° N 9.5340493° E"
118 | leisure | firepit |
120 Scenario: Arbitrary key/value search near given coordinate and named place
121 When sending json search query "[leisure=firepit] ebenholz 47° 9′ 26″ N 9° 36′ 45″ E"
124 | leisure | firepit |
126 Scenario Outline: Key/value search near given coordinate can be restricted to country
127 When sending json search query "[natural=peak] 47.06512,9.53965" with address
130 Then result addresses contain
139 Scenario: Name search near given coordinate
140 When sending json search query "sporry" with address
141 Then result addresses contain
144 When sending json search query "sporry, 47.10791,9.52676" with address
145 Then result addresses contain
149 Scenario: Name search near given coordinate without result
150 When sending json search query "sporry, N 47 15 7 W 9 61 26"
151 Then exactly 0 results are returned
153 Scenario: Arbitrary key/value search near a road
154 When sending json search query "[amenity=drinking_water] Wissfläckaweg"
157 | amenity | drinking_water |
159 Scenario: Ignore other country codes in structured search with country
160 When sending json search query ""
163 Then exactly 0 results are returned
165 Scenario: Ignore country searches when query is restricted to countries
166 When sending json search query "de"
169 Then exactly 0 results are returned
171 Scenario: Country searches only return results for the given country
172 When sending search query "Ans Trail" with address
175 Then result addresses contain
179 # https://trac.openstreetmap.org/ticket/5094
180 Scenario: housenumbers are ordered by complete match first
181 When sending json search query "Austrasse 11, Vaduz" with address
182 Then result addresses contain
183 | ID | house_number |
187 Scenario Outline: Coordinate searches with white spaces
188 When sending json search query "<data>"
189 Then exactly 1 result is returned
196 | sporry weiher, N 47.10791° E 9.52676° |
197 | sporry weiher, N 47.10791° E 9.52676° |
198 | sporry weiher , N 47.10791° E 9.52676° |
199 | sporry weiher, N 47.10791° E 9.52676° |
200 | sporry weiher
\v, N 47.10791° E 9.52676° |
202 Scenario: Searches with white spaces
203 When sending json search query "52 Bodastr
\v,
\fTriesenberg"
206 | highway | residential |
210 Scenario: Addressdetails always return the place type
211 When sending json search query "Vaduz" with address
212 Then result addresses contain
216 Scenario: Search can handle complex query word sets
217 When sending search query "aussenstelle universitat lichtenstein wachterhaus aussenstelle universitat lichtenstein wachterhaus aussenstelle universitat lichtenstein wachterhaus aussenstelle universitat lichtenstein wachterhaus"
218 Then a HTTP 200 is returned