]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/api/search/queries.feature
reinstate key-value amenity search
[nominatim.git] / test / bdd / api / search / queries.feature
1 @APIDB
2 Feature: Search queries
3     Generic search result correctness
4
5     Scenario: House number search for non-street address
6         When sending json search query "2 Steinwald, Austria" with address
7           | accept-language |
8           | en |
9         Then address of result 0 is
10           | type         | value |
11           | house_number | 2 |
12           | hamlet       | Steinwald |
13           | postcode     | 6811 |
14           | country      | Austria |
15           | country_code | at |
16
17     Scenario: House number interpolation even
18         When sending json search query "Schellingstr 86, Hamburg" with address
19           | accept-language |
20           | de |
21         Then address of result 0 is
22           | type         | value |
23           | house_number | 86 |
24           | road         | Schellingstraße |
25           | suburb       | Eilbek |
26           | postcode     | 22089 |
27           | city_district | Wandsbek |
28           | state        | Hamburg |
29           | country      | Deutschland |
30           | country_code | de |
31
32     Scenario: House number interpolation odd
33         When sending json search query "Schellingstr 73, Hamburg" with address
34           | accept-language |
35           | de |
36         Then address of result 0 is
37           | type         | value |
38           | house_number | 73 |
39           | road         | Schellingstraße |
40           | suburb       | Eilbek |
41           | postcode     | 22089 |
42           | city_district | Wandsbek |
43           | state        | Hamburg |
44           | country      | Deutschland |
45           | country_code | de |
46
47     @Tiger
48     Scenario: TIGER house number
49         When sending json search query "323 22nd Street Southwest, Huron"
50         Then results contain
51          | osm_type |
52          | way |
53
54     Scenario: Search with class-type feature
55         When sending jsonv2 search query "Hotel in California"
56         Then results contain
57           | place_rank |
58           | 30 |
59
60     Scenario: Search with specific amenity
61         When sending json search query "[restaurant] Vaduz" with address
62         Then result addresses contain
63           | country |
64           | Liechtenstein |
65         And  results contain
66           | class   | type |
67           | amenity | restaurant |
68
69     Scenario: Search with key-value amenity
70         When sending json search query "[shop=hifi] hamburg"
71         Then results contain
72           | class | type |
73           | shop  | hifi |
74
75     Scenario: With multiple amenity search only the first is used
76         When sending json search query "[shop=hifi] [church] hamburg"
77         Then results contain
78           | class | type |
79           | shop  | hifi |
80
81     Scenario: With multiple amenity search only the first is used
82         When sending json search query "[church] [restaurant] hamburg"
83         Then results contain
84           | class   | type |
85           | amenity | place_of_worship |
86
87     # https://trac.openstreetmap.org/ticket/5094
88     Scenario: housenumbers are ordered by complete match first
89         When sending json search query "6395 geminis, montevideo" with address
90         Then result addresses contain
91           | ID | house_number |
92           | 0  | 6395 |
93           | 1  | 6395 BIS |
94