mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-14 01:47:57 +00:00
Indexing: invert boolean logic to factor-out empty ELSE clause
Relates-to commit fa2a789e27.
This commit is contained in:
@@ -87,11 +87,9 @@ BEGIN
|
||||
IF location.name is not NULL THEN
|
||||
{% if debug %}RAISE WARNING 'Names original: %, location: %', result.name, location.name;{% endif %}
|
||||
|
||||
-- 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);
|
||||
IF default_language is NULL OR location.name ? ('name:' || default_language) THEN
|
||||
-- No default language, or a name in the local language is already configured; do nothing
|
||||
ELSE
|
||||
-- Merge in a default-language name from the linked place
|
||||
IF default_language is not NULL AND NOT location.name ? ('name:' || default_language) THEN
|
||||
location.name := location.name || hstore('name:' || default_language, location.name->'name');
|
||||
END IF;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user