MediaWiki 1.42.1
MediaWiki\Content\Hook\SearchDataForIndexHook Interface Reference

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

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onSearchDataForIndex (&$fields, $handler, $page, $output, $engine)
 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
Deprecated
since 1.40, use SearchDataForIndexHook2 instead.

Definition at line 18 of file SearchDataForIndexHook.php.

Member Function Documentation

◆ onSearchDataForIndex()

MediaWiki\Content\Hook\SearchDataForIndexHook::onSearchDataForIndex ( & $fields,
$handler,
$page,
$output,
$engine )

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.35
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
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: