diff options
Diffstat (limited to 'maintenance/rebuildtextindex.php')
-rw-r--r-- | maintenance/rebuildtextindex.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/maintenance/rebuildtextindex.php b/maintenance/rebuildtextindex.php index 534b7ca1..c651f720 100644 --- a/maintenance/rebuildtextindex.php +++ b/maintenance/rebuildtextindex.php @@ -25,7 +25,7 @@ * @todo document */ -require_once( __DIR__ . '/Maintenance.php' ); +require_once __DIR__ . '/Maintenance.php'; /** * Maintenance script that rebuilds search index table from scratch. @@ -115,9 +115,8 @@ class RebuildTextIndex extends Maintenance { $rev = new Revision( $s ); $content = $rev->getContent(); - $text = $content->getTextForSearchIndex(); - $u = new SearchUpdate( $s->page_id, $title, $text ); + $u = new SearchUpdate( $s->page_id, $title, $content ); $u->doUpdate(); } catch ( MWContentSerializationException $ex ) { $this->output( "Failed to deserialize content of revision {$s->rev_id} of page " @@ -147,7 +146,7 @@ class RebuildTextIndex extends Maintenance { $searchindex = $this->db->tableName( 'searchindex' ); $this->output( "\nRebuild the index...\n" ); $sql = "ALTER TABLE $searchindex ADD FULLTEXT si_title (si_title), " . - "ADD FULLTEXT si_text (si_text)"; + "ADD FULLTEXT si_text (si_text)"; $this->db->query( $sql, __METHOD__ ); } @@ -162,4 +161,4 @@ class RebuildTextIndex extends Maintenance { } $maintClass = "RebuildTextIndex"; -require_once( RUN_MAINTENANCE_IF_MAIN ); +require_once RUN_MAINTENANCE_IF_MAIN; |