]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/db/query/linking.feature
Merge pull request #3517 from lonvia/improve-custom-formatter
[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 0.1 grid
7          | 10 |   | 11 |
8          |    | 2 |    |
9          | 13 |   | 12 |
10         Given the places
11          | osm  | class    | type           | admin | name  | geometry |
12          | R13  | boundary | administrative | 6     | Garbo | (10,11,12,13,10) |
13         Given the places
14          | osm  | class    | type           | admin | name+name:it |
15          | N2   | place    | hamlet         | 15    | Vario        |
16         And the relations
17          | id | members       | tags+type |
18          | 13 | N2:label      | boundary |
19         When importing
20         Then placex contains
21          | object  | linked_place_id |
22          | N2      | R13 |
23         When sending search query "Vario"
24          | namedetails |
25          | 1 |
26         Then results contain
27          | osm | display_name | namedetails |
28          | R13 | Garbo | "name": "Garbo", "name:it": "Vario" |
29         When sending search query "Vario"
30          | accept-language |
31          | it |
32         Then results contain
33          | osm | display_name |
34          | R13 | Vario |
35
36
37     Scenario: Differing names from linked places are searchable
38         Given the 0.1 grid
39          | 10 |   | 11 |
40          |    | 2 |    |
41          | 13 |   | 12 |
42         Given the places
43          | osm  | class    | type           | admin | name  | geometry |
44          | R13  | boundary | administrative | 6     | Garbo | (10,11,12,13,10) |
45         Given the places
46          | osm  | class    | type           | admin | name  |
47          | N2   | place    | hamlet         | 15    | Vario |
48         And the relations
49          | id | members       | tags+type |
50          | 13 | N2:label      | boundary |
51         When importing
52         Then placex contains
53          | object  | linked_place_id |
54          | N2      | R13 |
55         When sending search query "Vario"
56          | namedetails |
57          | 1 |
58         Then results contain
59          | osm | display_name | namedetails |
60          | R13 | Garbo        | "name": "Garbo", "_place_name": "Vario" |
61         When sending search query "Garbo"
62         Then results contain
63          | osm | display_name |
64          | R13 | Garbo |