mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
Merge pull request #3988 from jayaddison/pr-3957-followup/empty-name-field
Indexing: fixup: add presence check for hstore 'name' field
This commit is contained in:
@@ -89,7 +89,7 @@ BEGIN
|
|||||||
|
|
||||||
-- Add the linked-place (e.g. city) name as a searchable placename in the default language (if any)
|
-- Add the linked-place (e.g. city) name as a searchable placename in the default language (if any)
|
||||||
default_language := get_country_language_code(location.country_code);
|
default_language := get_country_language_code(location.country_code);
|
||||||
IF default_language is not NULL AND NOT location.name ? ('name:' || default_language) THEN
|
IF default_language is not NULL AND location.name ? 'name' AND NOT location.name ? ('name:' || default_language) THEN
|
||||||
location.name := location.name || hstore('name:' || default_language, location.name->'name');
|
location.name := location.name || hstore('name:' || default_language, location.name->'name');
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
|
|||||||
@@ -299,18 +299,23 @@ Feature: Linking of places
|
|||||||
|
|
||||||
Scenario: Linked places expand default language names
|
Scenario: Linked places expand default language names
|
||||||
Given the grid with origin CO
|
Given the grid with origin CO
|
||||||
| 1 | | 2 |
|
| 1 | | 2 | | 5 | | 6 |
|
||||||
| | 9 | |
|
| | 9 | | | | 10 | |
|
||||||
| 4 | | 3 |
|
| 4 | | 3 | | 8 | | 7 |
|
||||||
Given the places
|
And the places
|
||||||
| osm | class | type | name+name | geometry |
|
| osm | class | type | name+name | geometry |
|
||||||
| N9 | place | city | Popayán | 9 |
|
| N9 | place | city | Popayán | 9 |
|
||||||
Given the places
|
And the places
|
||||||
|
| osm | class | type | name+name:en | geometry |
|
||||||
|
| N10 | place | city | Open | 10 |
|
||||||
|
And the places
|
||||||
| osm | class | type | name+name | geometry | admin |
|
| osm | class | type | name+name | geometry | admin |
|
||||||
| R1 | boundary | administrative | Perímetro Urbano Popayán | (1,2,3,4,1) | 8 |
|
| R1 | boundary | administrative | Perímetro Urbano Popayán | (1,2,3,4,1) | 8 |
|
||||||
|
| R2 | boundary | administrative | Abre | (5,6,7,8,5) | 8 |
|
||||||
And the relations
|
And the relations
|
||||||
| id | members |
|
| id | members |
|
||||||
| 1 | N9:label |
|
| 1 | N9:label |
|
||||||
|
| 2 | N10:label |
|
||||||
When importing
|
When importing
|
||||||
Then placex contains
|
Then placex contains
|
||||||
| object | linked_place_id |
|
| object | linked_place_id |
|
||||||
|
|||||||
Reference in New Issue
Block a user