From: Sarah Hoffmann Date: Wed, 30 Oct 2013 20:09:21 +0000 (+0100) Subject: avoid adding NULL tokens for frequent full names X-Git-Tag: v2.2.0~17^2~8 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/bb18cc861caea017266761fcca2429d045a254b0 avoid adding NULL tokens for frequent full names --- diff --git a/sql/functions.sql b/sql/functions.sql index bc366f8b..4670a71f 100644 --- a/sql/functions.sql +++ b/sql/functions.sql @@ -347,7 +347,7 @@ BEGIN w := getorcreate_word_id(s); - IF NOT (ARRAY[w] <@ result) THEN + IF w IS NOT NULL AND NOT (ARRAY[w] <@ result) THEN result := result || w; END IF; @@ -415,7 +415,7 @@ BEGIN w := getorcreate_word_id(s); - IF NOT (ARRAY[w] <@ result) THEN + IF w IS NOT NULL AND NOT (ARRAY[w] <@ result) THEN result := result || w; END IF;