]> git.openstreetmap.org Git - nominatim.git/commitdiff
add partial word search term to keywords as well
authorSarah Hoffmann <lonvia@denofr.de>
Fri, 8 Feb 2013 18:11:15 +0000 (19:11 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Fri, 8 Feb 2013 18:11:15 +0000 (19:11 +0100)
sql/functions.sql

index fc48512859ea8b086ac8242a7b970fe630a582dd..6fbdeb46b15cc98debf9df66c6fac9c850f53553 100644 (file)
@@ -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