Thread:Project:Support desk/Visible templates in search results/reply

This is 18861.

Basically one needs to run expand templates (aka run the preprocesser) before feeding the page text to the search engine.

There's some very limitted docs at http://svn.wikimedia.org/doc/classSearchEngine.html for the search engine class. Different search engines can be registered by using the $wgSearchType registration variable. The SearchUpdate hook may also be useful. Templates can be expanded using the preprocess method of the parser (I'm not sure off the top of my head if that's the most correct way vs some method involving preprocessToDom/preprocessor class, but preprocess seems to be what special:expandtemplates does).