MediaWiki
REL1_22
|
Maintenance script that rebuilds search index table from scratch. More...
Public Member Functions | |
__construct () | |
execute () | |
getDbType () | |
Does the script need different DB access? By default, we give Maintenance scripts normal rights to the DB. | |
Public Attributes | |
const | RTI_CHUNK_SIZE = 500 |
Protected Member Functions | |
populateSearchIndex () | |
Populates the search index with content from all pages. | |
Private Member Functions | |
clearSearchIndex () | |
Deletes everything from search index. | |
createMysqlTextIndex () | |
(MySQL only) Adds back fulltext index after populating the table. | |
dropMysqlTextIndex () | |
(MySQL only) Drops fulltext index before populating the table. | |
Private Attributes | |
DatabaseBase | $db |
Maintenance script that rebuilds search index table from scratch.
Definition at line 35 of file rebuildtextindex.php.
Reimplemented from Maintenance.
Definition at line 42 of file rebuildtextindex.php.
RebuildTextIndex::clearSearchIndex | ( | ) | [private] |
Deletes everything from search index.
Definition at line 155 of file rebuildtextindex.php.
Referenced by execute().
RebuildTextIndex::createMysqlTextIndex | ( | ) | [private] |
(MySQL only) Adds back fulltext index after populating the table.
Definition at line 144 of file rebuildtextindex.php.
Referenced by execute().
RebuildTextIndex::dropMysqlTextIndex | ( | ) | [private] |
(MySQL only) Drops fulltext index before populating the table.
Definition at line 132 of file rebuildtextindex.php.
Referenced by execute().
Reimplemented from Maintenance.
Definition at line 51 of file rebuildtextindex.php.
References $wgTitle, clearSearchIndex(), createMysqlTextIndex(), dropMysqlTextIndex(), Maintenance\error(), DatabaseSqlite\getFulltextSearchModule(), global, Title\newFromText(), Maintenance\output(), populateSearchIndex(), and wfGetDB().
Does the script need different DB access? By default, we give Maintenance scripts normal rights to the DB.
Sometimes, a script needs admin rights access for a reason and sometimes they want no access. Subclasses should override and return one of the following values, as needed: Maintenance::DB_NONE - For no DB access at all Maintenance::DB_STD - For normal DB access, default Maintenance::DB_ADMIN - For admin DB access
Reimplemented from Maintenance.
Definition at line 47 of file rebuildtextindex.php.
References Maintenance\DB_ADMIN.
RebuildTextIndex::populateSearchIndex | ( | ) | [protected] |
Populates the search index with content from all pages.
Definition at line 87 of file rebuildtextindex.php.
Referenced by execute().
DatabaseBase RebuildTextIndex::$db [private] |
Definition at line 40 of file rebuildtextindex.php.
const RebuildTextIndex::RTI_CHUNK_SIZE = 500 |
Definition at line 36 of file rebuildtextindex.php.