MediaWiki master
MediaWiki\Deferred\SearchUpdate Class Reference

Database independent search index updater. More...

Inherits MediaWiki\Deferred\DeferrableUpdate.

Collaboration diagram for MediaWiki\Deferred\SearchUpdate:

Public Member Functions

 __construct ( $id, $page, ?Content $c=null)
 doUpdate ()
 Perform actual update for the entry.
 updateText ( $text, SearchEngine $se=null)
 Clean text for indexing.

Detailed Description

Database independent search index updater.

Definition at line 42 of file SearchUpdate.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Deferred\SearchUpdate::__construct ( $id,
?Content $c = null )
int$idPage id to update
PageIdentity$pagePage to update
Content | null$cContent of the page to update.

Definition at line 60 of file SearchUpdate.php.

Member Function Documentation

◆ doUpdate()

MediaWiki\Deferred\SearchUpdate::doUpdate ( )

◆ updateText()

MediaWiki\Deferred\SearchUpdate::updateText ( $text,
SearchEngine $se = null )

Clean text for indexing.

Only really suitable for indexing in databases. If you're using a real search engine, you'll probably want to override this behavior and do something nicer with the original wikitext.

SearchEngine | null$seSearch engine

Definition at line 112 of file SearchUpdate.php.

References MediaWiki\MediaWikiServices\getInstance().

Referenced by MediaWiki\Deferred\SearchUpdate\doUpdate().

The documentation for this class was generated from the following file: