Since slashes in page titles have special meaning, force them to delimit words.
authorGreg Sabino Mullane <greg@users.mediawiki.org>
Thu, 6 Sep 2007 16:32:00 +0000 (16:32 +0000)
committerGreg Sabino Mullane <greg@users.mediawiki.org>
Thu, 6 Sep 2007 16:32:00 +0000 (16:32 +0000)
maintenance/postgres/tables.sql

index 360dd9c..694c253 100644 (file)
@@ -457,9 +457,9 @@ CREATE FUNCTION ts2_page_title() RETURNS TRIGGER LANGUAGE plpgsql AS
 $mw$
 BEGIN
 IF TG_OP = 'INSERT' THEN
-  NEW.titlevector = to_tsvector('default',NEW.page_title);
+  NEW.titlevector = to_tsvector('default',REPLACE(NEW.page_title,'/',' '));
 ELSIF NEW.page_title != OLD.page_title THEN
-  NEW.titlevector := to_tsvector('default',NEW.page_title);
+  NEW.titlevector := to_tsvector('default',REPLACE(NEW.page_title,'/',' '));
 END IF;
 RETURN NEW;
 END;