]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/db/query/linking.feature
make sure outputs take into account linked place names
[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         Then results contain
21          | osm | display_name |
22          | R13 | Garbo |
23         When sending search query "Vario"
24          | accept-language |
25          | it |
26         Then results contain
27          | osm | display_name |
28          | R13 | Vario |
29
30
31     Scenario: Differing names from linked places are searchable
32         Given the places
33          | osm  | class    | type           | admin | name  | geometry |
34          | R13  | boundary | administrative | 6     | Garbo | poly-area:0.1 |
35         Given the places
36          | osm  | class    | type           | admin | name  | geometry |
37          | N2   | place    | hamlet         | 15    | Vario | 0.006 0.00001 |
38         And the relations
39          | id | members       | tags+type |
40          | 13 | N2:label      | boundary |
41         When importing
42         Then placex contains
43          | object  | linked_place_id |
44          | N2      | R13 |
45         When sending search query "Vario"
46         Then results contain
47          | osm | display_name |
48          | R13 | Garbo |
49         When sending search query "Garbo"
50         Then results contain
51          | osm | display_name |
52          | R13 | Garbo |