]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/features/db/query/linking.feature
release 5.1.0.post5
[nominatim.git] / test / bdd / features / db / query / linking.feature
1 Feature: Searching linked places
2     Tests that information from linked places can be searched correctly
3
4     Scenario: Additional names from linked places are searchable
5         Given the 0.1 grid
6          | 10 |   | 11 |
7          |    | 2 |    |
8          | 13 |   | 12 |
9         Given the places
10          | osm  | class    | type           | admin | name  | geometry |
11          | R13  | boundary | administrative | 6     | Garbo | (10,11,12,13,10) |
12         Given the places
13          | osm  | class    | type           | admin | name+name:it |
14          | N2   | place    | hamlet         | 15    | Vario        |
15         And the relations
16          | id | members       | tags+type |
17          | 13 | N2:label      | boundary |
18         When importing
19         Then placex contains
20          | object  | linked_place_id |
21          | N2      | R13 |
22         When geocoding "Vario"
23          | namedetails |
24          | 1 |
25         Then all results contain
26          | object | display_name | namedetails!dict |
27          | R13    | Garbo | "name": "Garbo", "name:it": "Vario" |
28         When geocoding "Vario"
29          | accept-language |
30          | it |
31         Then all results contain
32          | object | display_name |
33          | R13    | Vario |
34
35
36     Scenario: Differing names from linked places are searchable
37         Given the 0.1 grid
38          | 10 |   | 11 |
39          |    | 2 |    |
40          | 13 |   | 12 |
41         Given the places
42          | osm  | class    | type           | admin | name  | geometry |
43          | R13  | boundary | administrative | 6     | Garbo | (10,11,12,13,10) |
44         Given the places
45          | osm  | class    | type           | admin | name  |
46          | N2   | place    | hamlet         | 15    | Vario |
47         And the relations
48          | id | members       | tags+type |
49          | 13 | N2:label      | boundary |
50         When importing
51         Then placex contains
52          | object  | linked_place_id |
53          | N2      | R13 |
54         When geocoding "Vario"
55          | namedetails |
56          | 1 |
57         Then all results contain
58          | object | display_name | namedetails!dict |
59          | R13    | Garbo        | "name": "Garbo", "_place_name": "Vario" |
60         When geocoding "Garbo"
61         Then all results contain
62          | object | display_name |
63          | R13    | Garbo |