I want to set up the search ability but so far I am stumbling around half-blind trying to figure it out from odd snippets here and there from old posts.
Is there a URL which describes in an orderly manner what I need to do to set up the search facility?
Thanks,
Hugh
Hugh Prior wrote:
I want to set up the search ability but so far I am stumbling around half-blind trying to figure it out from odd snippets here and there from old posts.
Is there a URL which describes in an orderly manner what I need to do to set up the search facility?
You don't have to do anything.
-- brion vibber (brion @ pobox.com)
What you say doesn't appear to be true; on my 1.5.6 MediaWiki setup, search wasn't working at.
Well, I eventually figured out what I needed to get it working: 1) Set values in the "AdminSettings.php" file (and ensure it is named "AdminSettings.php") in the root directory 2) Run "rebuildtextindex.php" in the maintanance directory from the command line.
Now the search works correctly.
Some questions a) The fact I did have to do something, did I do something which should somehow not have been necessary, or did you think that this is not anything? b) As I said before, where (if anywhere) is this documented?
"Brion Vibber" brion@pobox.com wrote in message news:4493222D.5090304@pobox.com... You don't have to do anything.
-- brion vibber (brion @ pobox.com)
On 19/06/06, Hugh Prior mediawiki@localpin.com wrote:
What you say doesn't appear to be true; on my 1.5.6 MediaWiki setup, search wasn't working at.
Well, I eventually figured out what I needed to get it working:
- Set values in the "AdminSettings.php" file (and ensure it is named
"AdminSettings.php") in the root directory 2) Run "rebuildtextindex.php" in the maintanance directory from the command line.
Did you populate your wiki's content in a mass-import fashion? If so, then building the index has to be done as part of a separate process; this is documented in the various bits of documentation relating to imports.
Rob Church
There was no mass-import. This is a new wiki. I did not realise (until now) that I had to do a seperate process.
Where specifically is this explained? I looked in the FAQ and there is nothing in there.
"Rob Church" robchur@gmail.com wrote in message news:e92136380606190956jb3a9e8bv126672abe49e8562@mail.gmail.com...
Did you populate your wiki's content in a mass-import fashion? If so, then building the index has to be done as part of a separate process; this is documented in the various bits of documentation relating to imports.
Rob Church
On 19/06/06, Hugh Prior mediawiki@localpin.com wrote:
There was no mass-import. This is a new wiki. I did not realise (until now) that I had to do a seperate process.
Where specifically is this explained? I looked in the FAQ and there is nothing in there.
Well, then, separate index building *shouldn't* be needed.
Rob Church
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@gmail.com wrote in message news:e92136380606191023i5262c1f7uacdb2ab55f6476dc@mail.gmail.com...
Well, then, separate index building *shouldn't* be needed.
On 20/06/06, Hugh Prior mediawiki@localpin.com wrote:
So, to repeat my question: what for a single named page do I need to call to get MediaWiki to update the search index?
Article::editUpdates().
Rob Church
Thanks Rob! That seems to have done the trick :-).
Except "Main Page", not seeming to get updated (MediaWiki bug?) in the index. Still I can live with a single manual edit to bring that in the loop.
My createWikiPage() function now has a call as follows: $article->editUpdates($pageText, "my summary", false, wfTimestampNow());
But where does "my summary" text get saved? And thus where would it ever be seen by users? Not recent changes? I already make a call to ensure the recent changes table is updated. Maybe this is not now needed, though a test seems to show that I still need this code. // Ensure recent change table has entry $isminor = false; $summary = "Auto-created via clicked-on link."; RecentChange::notifyNew( wfTimestampNow(), $title, $isminor, $wgUser, $summary, 'default', '', strlen( $pageText ), $revid );
"Rob Church" robchur@gmail.com wrote in message news:e92136380606200709i78e2ce1t525f796902dcd7f9@mail.gmail.com...
On 20/06/06, Hugh Prior mediawiki@localpin.com wrote:
Article::editUpdates().
Could you post a pointer to your createWikiPage when it's done, please. It sounds very useful.
On Jun 20, 2006, at 9:49 AM, Hugh Prior wrote:
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@gmail.com wrote in message news:e92136380606191023i5262c1f7uacdb2ab55f6476dc@mail.gmail.com...
Well, then, separate index building *shouldn't* be needed.
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
It surprises me in fact that something does not already exist which pulls together all the necessary things you need to call and which takes simply a page title and the page content.
Hugh
"The Centerfielder" centerfielder@centerfieldview.com wrote in message news:E8D33AD4-3012-4C6E-8E3C-83A0C6AB5BA6@centerfieldview.com...
Could you post a pointer to your createWikiPage when it's done, please. It sounds very useful.
Every time you create or edit a page the entry in the searchindex is updated, this allows the search facility to work as soon as there is any content. Hence no FAQ entry
The rebuild search index script is used when the searchindex table becomes corrupted and has to be recreated, or pages have been imported
Perhaps you didn't copy all the pages correctly and new pages creations or edits are failing to create searchindex database entries, or maybe permissions for that table weren't set properly; either way I would have though an error would be displayed if they weren't stored.
Arthur Guy arthur@astarsolutions.co.uk -----Original Message----- I did not realise (until now) that I had to do a seperate process.
Where specifically is this explained? I looked in the FAQ and there is nothing in there.
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org