From 12c0944d939581e456045673b9387cde3681b0bf Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Fri, 8 Feb 2013 19:11:15 +0100 Subject: [PATCH] add partial word search term to keywords as well --- sql/functions.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sql/functions.sql b/sql/functions.sql index fc485128..6fbdeb46 100644 --- a/sql/functions.sql +++ b/sql/functions.sql @@ -345,6 +345,12 @@ BEGIN result := result || w; END IF; + w := getorcreate_word_id(s); + + IF NOT (ARRAY[w] <@ result) THEN + result := result || w; + END IF; + words := string_to_array(s, ' '); IF array_upper(words, 1) IS NOT NULL THEN FOR j IN 1..array_upper(words, 1) LOOP @@ -407,6 +413,12 @@ BEGIN result := result || w; END IF; + w := getorcreate_word_id(s); + + IF NOT (ARRAY[w] <@ result) THEN + result := result || w; + END IF; + words := string_to_array(s, ' '); IF array_upper(words, 1) IS NOT NULL THEN FOR j IN 1..array_upper(words, 1) LOOP