Index: trunk/phase3/maintenance/postgres/archives/patch-ts2pagetitle.sql |
— | — | @@ -0,0 +1,13 @@ |
| 2 | +CREATE OR REPLACE FUNCTION ts2_page_title() |
| 3 | +RETURNS TRIGGER |
| 4 | +LANGUAGE plpgsql AS |
| 5 | +$mw$ |
| 6 | +BEGIN |
| 7 | +IF TG_OP = 'INSERT' THEN |
| 8 | + NEW.titlevector = to_tsvector('default',REPLACE(NEW.page_title,'/',' ')); |
| 9 | +ELSIF NEW.page_title != OLD.page_title THEN |
| 10 | + NEW.titlevector := to_tsvector('default',REPLACE(NEW.page_title,'/',' ')); |
| 11 | +END IF; |
| 12 | +RETURN NEW; |
| 13 | +END; |
| 14 | +$mw$; |
Property changes on: trunk/phase3/maintenance/postgres/archives/patch-ts2pagetitle.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 15 | + native |
Index: trunk/phase3/maintenance/updaters.inc |
— | — | @@ -1526,5 +1526,9 @@ |
1527 | 1527 | dbsource($ni[2]); |
1528 | 1528 | } |
1529 | 1529 | |
| 1530 | + # Tweak the page_title tsearch2 trigger to filter out slashes |
| 1531 | + # This is create or replace, so harmless to call if not needed |
| 1532 | + dbsource(archive("patch-ts2pagetitle.sql")); |
| 1533 | + |
1530 | 1534 | return; |
1531 | 1535 | } |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -23,6 +23,7 @@ |
24 | 24 | === New features in 1.12 === |
25 | 25 | |
26 | 26 | === Bug fixes in 1.12 === |
| 27 | +* Subpages are now indexed for searching properly when using Postgres |
27 | 28 | |
28 | 29 | === API changes in 1.12 === |
29 | 30 | |