3 namespace MediaWiki\Content\Hook
;
5 use MediaWiki\Content\ContentHandler
;
6 use MediaWiki\Parser\ParserOutput
;
11 * This is a hook handler interface, see docs/Hooks.md.
12 * Use the hook name "SearchDataForIndex" to register handlers implementing this interface.
14 * @stable to implement
15 * @deprecated since 1.40, use SearchDataForIndexHook2 instead.
18 interface SearchDataForIndexHook
{
20 * Use this hook to add data to search document. Allows you to add any data to
21 * the field map used to index the document.
25 * @param array &$fields Array of name => value pairs for fields
26 * @param ContentHandler $handler ContentHandler for the content being indexed
27 * @param WikiPage $page WikiPage that is being indexed
28 * @param ParserOutput $output ParserOutput that is produced from the page
29 * @param SearchEngine $engine SearchEngine for which the indexing is intended
30 * @return bool|void True or no return value to continue or false to abort
32 public function onSearchDataForIndex( &$fields, $handler, $page, $output,