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 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 will be deprecated (silently) and SearchDataForIndex2 should be used instead.

Please let me know if you have questions/strong objections to this approach.

--
David Causse