Hi,
I made a few entries on the London openguide tonight, and in each instance received an error similar to this when commiting the edit:
Search::InvertedIndex::add_index() - Unable to read 'ie_000000000be6' record. Database may be corrupt. at /home/earle/openguides.org/lib/CGI/Wiki/Search/SII. pm line 204
Despite this, the entries were apparently entered into the Wikki.
Regards,
Matt
On Sun 21 Dec 2003, Matt Harvey matt@red-redemption.com wrote:
I made a few entries on the London openguide tonight, and in each instance received an error similar to this when commiting the edit:
Search::InvertedIndex::add_index() - Unable to read 'ie_000000000be6' record. Database may be corrupt. at /home/earle/openguides.org/lib/CGI/Wiki/Search/SII.pm line 204
Yeah - we seem to have some issues with the (Berkeley DB) indexes becoming corrupted. The solution we're using at the moment is just to delete and rebuild the indexes. This is not ideal.
Earle - here's the current reindexing script. It's pretty simple.
---------------------------------------------------------------------- #!/usr/local/bin/perl use strict; use warnings; use Config::Tiny; use OpenGuides::Utils;
my $config = Config::Tiny->read('wiki.conf'); my $wiki = OpenGuides::Utils->make_wiki_object( config => $config );
my @nodes = $wiki->list_all_nodes; foreach my $node ( @nodes ) { my $content = $wiki->retrieve_node( $node ); $wiki->search_obj->index_node( $node, $content ); print "Reindexed $node\n"; } ----------------------------------------------------------------------
This version doesn't bugger up recent changes.
Kake
On Sun, Dec 21, 2003 at 11:48:11AM +0000, Kate L Pugh wrote:
Earle - here's the current reindexing script. It's pretty simple.
I just tried running this (saved it in the london directory) but it resulted in this message:
Search::InvertedIndex::update() - Failed to save updated 'ged_000000000000_a_000000000000' -> (list of ranked keys) at /home/earle/openguides.org/lib/CGI/Wiki/Search/SII.pm line 204
On Sun, Dec 21, 2003 at 11:48:11AM +0000, Kate L Pugh wrote:
Earle - here's the current reindexing script. It's pretty simple.
On Mon 22 Dec 2003, Earle Martin openguides@downlode.org wrote:
I just tried running this (saved it in the london directory) but it resulted in this message:
Search::InvertedIndex::update() - Failed to save updated 'ged_000000000000_a_000000000000' -> (list of ranked keys) at /home/earle/openguides.org/lib/CGI/Wiki/Search/SII.pm line 204
Remove the old indexes first. Don't forget to chmod the new files afterwards so the webserver can read them.
Might be a plan to throw this into cron.
Kake
On Mon, Dec 22, 2003 at 01:26:56PM +0000, Kate L Pugh wrote:
Remove the old indexes first. Don't forget to chmod the new files afterwards so the webserver can read them.
Right, OK. Wouldn't removing the indexes (indices?) cause problems, though?
Might be a plan to throw this into cron.
If it doesn't break anything, absolutely.
On Mon 22 Dec 2003, Earle Martin openguides@downlode.org wrote:
Wouldn't removing the indexes (indices?) cause problems, though?
In the short time window between removing and rebuilding the indexes, the wiki won't work. That's all.
Kake
openguides-london@lists.openguides.org