Manual:rebuildtextindex.php
From Linux Web Expert
<td class="mw-version-versionbox" title="<translate nowrap> The latest stable version is <tvar name=1>1.41</tvar></translate>">
<translate> ≥</translate> 1.2
<translate> MediaWiki version:</translate> |
MediaWiki file: rebuildtextindex.php | |
---|---|
Location: | maintenance/ |
Source code: | master • 1.41.1 • 1.40.3 • 1.39.7 |
Classes: | RebuildTextIndex |
Details
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.
Options/Arguments
This script does not take any options or arguments.
Usage
php maintenance/rebuildtextindex.php
Terminal
$ php maintenance/rebuildtextindex.php Dropping index... Clearing searchindex table...Done Rebuilding index fields for 29 pages... Rebuild the index... Done.
Notes
<td class="mw-version-versionbox" title="<translate nowrap> MediaWiki <tvar name=1>1.24</tvar> is unsupported version</translate>"><translate> ≤</translate> 1.24
MediaWiki version: |
- Note that before MediaWiki 1.25 this script does only add new entries to the searchindex 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 (<translate> task <tvar name=1>T64276</tvar></translate>). 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
- UpdateSearchIndex.php - a script to rebuild only recently updated pages.
- Rebuildall.php
- RefreshLinks.php
- Rebuildrecentchanges.php