MediaWiki master
MediaWiki\Content\Hook\SearchDataForIndex2Hook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onSearchDataForIndex2 (array &$fields, ContentHandler $handler, WikiPage $page, ParserOutput $output, SearchEngine $engine, RevisionRecord $revision)
 Use this hook to add data to search document.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "SearchDataForIndex" to register handlers implementing this interface.

Stability: stable
to implement

Definition at line 18 of file SearchDataForIndex2Hook.php.

Member Function Documentation

◆ onSearchDataForIndex2()

MediaWiki\Content\Hook\SearchDataForIndex2Hook::onSearchDataForIndex2 ( array & $fields,
ContentHandler $handler,
WikiPage $page,
ParserOutput $output,
SearchEngine $engine,
RevisionRecord $revision )

Use this hook to add data to search document.

Allows you to add any data to the field map used to index the document.

Since
1.40
Parameters
array&$fieldsArray of name => value pairs for fields
ContentHandler$handlerContentHandler for the content being indexed
WikiPage$pageWikiPage that is being indexed
ParserOutput$outputParserOutput that is produced from the page
SearchEngine$engineSearchEngine for which the indexing is intended
RevisionRecord$revisionRevisionRecord being indexed
Returns
bool|void True or no return value to continue or false to abort

Implemented in MediaWiki\HookContainer\HookRunner.


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