Hi agn,
figured it out myself, with a little help by Google. The following
statements can be used to rebuild the index:
UPDATE pagecontent SET textvector = NULL;
UPDATE page SET titlevector = NULL;
UPDATE pagecontent SET textvector = to_tsvector('default',old_text)
WHERE old_id
IN (SELECT rev_text_id FROM revision, page WHERE rev_id=page_latest
AND page_is_redirect=0 );
UPDATE page SET titlevector = to_tsvector('default',page_title) WHERE
page_is_redirect=0;
REINDEX INDEX ts2_page_text;
REINDEX INDEX ts2_page_title;
Maybe it helps someone with similar problems...
Harald
Husemann, Harald schrieb:
Hi,
I've recently moved our Mediawiki from a server with a mysql database to
a new one which uses pgsql.
I did this by using a script from Greg Sabino Mullane
<greg\(a)turnstep.com> (thanks for the good work, the script did the move
quite nice!).
The content is available in the new wiki, but there's one caveat: The
full text search seems to be broken, it does not find anything.
Searching for a page works fine, so I suppose there's a problem with the
indexes used by tsearch, maybe the import didn't fire the triggers to
rebuild the index?!
My environment:
* MediaWiki: 1.10.1
* PHP: 5.2.4 (apache2handler)
* PostgreSQL: PostgreSQL 8.1.4 on i386-pc-solaris2.10, compiled by
/ws/on10-tools/SUNWspro/SOS8/bin/cc -Xa
(Yes, I know that Postgres 8.1.4 is not up to date - but upgrading it is
not an option)
Is there any possibility to force a rebuild of the tsearch index base?
I tried it already with reindex database, "update pagecontent set
old_id=old_id;" and "update page set page_id = page_id;", but no
success...
Any ideas??
Thanks,
Harald
--
Harald Husemann
Netzwerk- und Systemadministrator
Operation Management Center (OMC)
MATERNA GmbH
Information & Communications
Westfalendamm 98
44141 Dortmund
Geschäftsführer: Dr. Winfried Materna, Helmut an de Meulen, Ralph Hartwig
Amtsgericht Dortmund HRB 5839
Tel: +49 231 9505 222
Fax: +49 231 9505 100
www.annyway.com <http://www.annyway.com/>
www.materna.com <http://www.materna.com/>