[Mediawiki-l] Setting up search

Hugh Prior mediawiki at localpin.com
Tue Jun 20 13:49:48 UTC 2006


Ah, thanks!  This is all clearer now.  I am actually creating wiki pages 
programatically from a database.  I have written a function 
"createWikiPage($pageName, $pageText)".  This is currently working extremely 
well, in the sense that the pages get created fine and display perfectly, 
and appear in the recent changes list correctly.

Except now I see that the function is not doing whatever it needs to be 
doing to get them in the search index.  (I checked by copy/pasting the 
content into a manually saved page, and true enough, the search index IS 
updated automatically).

So, my question now is: what for a single named page do I need to call to 
get MediaWiki to update the search index?

I have looked at the "maintenace/rebuildtextindex.php" code, but this seems 
too specialised at a whole rebuild to extract what I need to update a single 
page.  The SearchEngine and SearchUpdate classes seem more promising.  I was 
especially excited by the "update( $id, $title, $text )" function, though 
why $title is not enough to pass I'm not sure, and then I notice that the 
code just does "no-op" so I don't think that's going to help me much!

So, to repeat my question: what for a single named page do I need to call to 
get MediaWiki to update the search index?

Thanks,


Hugh

"Rob Church" <robchur at gmail.com> wrote in 
message news:e92136380606191023i5262c1f7uacdb2ab55f6476dc at mail.gmail.com...
>
> Well, then, separate index building *shouldn't* be needed.






More information about the MediaWiki-l mailing list