Last modified: 2014-02-19 22:31:11 UTC
Hi, Every release of MW since 1.10 I've been making a tweak to the rebuildtextindex.php to replace line 60 with the following code: if($s->page_namespace != NS_MAIN) { global $wgContLang; $title = $wgContLang->getNsText( $s->page_namespace ) . ':' . $s->page_title; } else { $title = $s->page_title; } $u = new SearchUpdate( $s->page_id, $title, $revtext ); I have no idea how the best way to get this into the main code base is, but I'm pretty sure as it stands its wrong in everyone's eyes - since the namespace information is currently lost. Ideally SearchUpdate would be refactored to take a namespace parameter, but this at least allows it to be retrieved intact. I found this problem when adding an extension to index the other namespaces. Or should I be using something else to rebuild the text search? Kind regards, Alex
It has been modified a lot since then: https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=history;f=maintenance/rebuildtextindex.php Current code: https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=maintenance/rebuildtextindex.php Can you check if your patch still makes sense on that? Have you tried MediaWiki 1.19?
Was fixed at some point when SearchUpdate was changed to take a Title object instead of a string. Implementations and hooks should be able to use that Title now.