From bb18cc861caea017266761fcca2429d045a254b0 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Wed, 30 Oct 2013 21:09:21 +0100 Subject: [PATCH] avoid adding NULL tokens for frequent full names --- sql/functions.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.5