mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
fix wikidata import
The loop was not skipping empty results of get_wikipedia_match().
This commit is contained in:
@@ -1358,7 +1358,7 @@ BEGIN
|
|||||||
END LOOP;
|
END LOOP;
|
||||||
|
|
||||||
NEW.importance := null;
|
NEW.importance := null;
|
||||||
SELECT importance, wikipedia
|
SELECT wikipedia, importance
|
||||||
FROM compute_importance(NEW.extratags, NEW.country_code, NEW.osm_type, NEW.osm_id)
|
FROM compute_importance(NEW.extratags, NEW.country_code, NEW.osm_type, NEW.osm_id)
|
||||||
INTO NEW.wikipedia,NEW.importance;
|
INTO NEW.wikipedia,NEW.importance;
|
||||||
|
|
||||||
@@ -2692,7 +2692,9 @@ DECLARE
|
|||||||
match RECORD;
|
match RECORD;
|
||||||
result place_importance;
|
result place_importance;
|
||||||
BEGIN
|
BEGIN
|
||||||
FOR match IN SELECT * FROM get_wikipedia_match(extratags, country_code) LOOP
|
FOR match IN SELECT * FROM get_wikipedia_match(extratags, country_code)
|
||||||
|
WHERE language is not NULL
|
||||||
|
LOOP
|
||||||
result.importance := match.importance;
|
result.importance := match.importance;
|
||||||
result.wikipedia := match.language || ':' || match.title;
|
result.wikipedia := match.language || ':' || match.title;
|
||||||
RETURN result;
|
RETURN result;
|
||||||
|
|||||||
Reference in New Issue
Block a user