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