Hi, The method ContentHandler::getDataForSearchIndex() is used by (non-core) MW SearchEngine implementations and was added in MW 1.28 to gather the data to be indexed. In 1.40 this signature will change to let SearchEngine implementations pass an optional RevisionRecord param <https://gerrit.wikimedia.org/r/c/mediawiki/core/+/832957/10/includes/content/ContentHandler.php#1382> to clarify what revision is being indexed (instead of assuming that the "latest" was requested). This is a breaking change if you maintain a ContentHandler subclass and have overridden the getDataForSearchIndex() method, you will have to change your method signature from:
public function getDataForSearchIndex( WikiPage $page, ParserOutput $output, SearchEngine $engine ) to public function getDataForSearchIndex( WikiPage $page, ParserOutput $output, SearchEngine $engine, RevisionRecord $revision = null ) If you own a SearchEngine implementation and rely on ContentHandler::getDataForSearchIndex() this is not a breaking change but it is advised to pass this new RevisionRecord parameter when calling it. Relatedly the hook SearchDataForIndex <https://www.mediawiki.org/wiki/Manual:Hooks/SearchDataForIndex> will be deprecated (silently) and SearchDataForIndex2 <https://www.mediawiki.org/wiki/Manual:Hooks/SearchDataForIndex2> should be used instead. Please let me know if you have questions/strong objections to this approach. -- David Causse
_______________________________________________ Wikitech-l mailing list -- [email protected] To unsubscribe send an email to [email protected] https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
