From: Sarah Hoffmann Date: Fri, 8 Feb 2013 18:11:15 +0000 (+0100) Subject: add partial word search term to keywords as well X-Git-Tag: v2.2.0~121 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/12c0944d939581e456045673b9387cde3681b0bf add partial word search term to keywords as well --- 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