Manual:rebuildtextindex.php

From MediaWiki.org
Jump to: navigation, search

Other languages:
Deutsch • ‎English • ‎日本語 • ‎polski

rebuildtextindex.php is a maintenance script used to [re]create the text index that allows users to use the search facility in your wiki. You should run it if you see that search gives no or few results.

This may take several hours, depending on the database size and server configuration.

Invocation[edit]

php maintenance/rebuildtextindex.php

Example[edit]

> php maintenance/rebuildtextindex.php
Dropping index...
Rebuilding index fields for 1426 pages...
1000
Rebuild the index...
Done.

Notes[edit]

MediaWiki version: 1.24
  • Note that before MediaWiki 1.25 this script does only add new entries to the searchindexManual:searchindex table table for existing pages, but it doesn't purge that table to remove deleted pages. If you get wrong search results (e.g. because deleted pages are still in the searchindex table data), this script will not help (task T64276). To purge old entries, delete all rows of that table before running the script. This is no longer necessary since MediaWiki 1.25 where this bug has been fixed.

See also[edit]