OK... Due to whenever a rebuild of the index is done, I am always getting random articles missing. So I have found when I did what is described here:
http://developer.mindtouch.com/en/re...e-index_a_Page
The article would show up... so here is a very DIRTY perl script that will do this for ALL of my articles and it appears to have worked. In an instance I have where I tried doing searches and only 1 article appeared and this was after a rebuild of the index, I then just ran this script and did the exact same search and behold... now I get ohh the 10 or so articles I was expecting... So this might help some of you:
Code:#!/usr/bin/perl -w use strict; use DBI; my $database = "mydb"; my $username = "mydbuser"; my $password = "mydbpass"; my $protocol = "http"; my $url = "myurl.domain.com"; my $kbadmin = "mykbadmin"; my $kbadminpass = "mykbadminpass"; my $hostname = "localhost"; my $dbh = DBI->connect("DBI:mysql:database=$database;host=$hostname",$username,$password,{'RaiseError' => 1}); my $sth = $dbh->prepare("SELECT page_id FROM pages WHERE page_is_hidden = 0 ORDER BY page_id"); $sth->execute(); while (my $ref = $sth->fetchrow_hashref()) { my $pageid = $ref->{'page_id'}; print "Found Row: $pageid\n"; system("curl -u $kbadmin:$kbadminpass -H \"Content-Type: text\/plain\" -d \"\" -i $protocol\:\/\/$url\/\@api\/deki\/pages\/$pageid\/index"); } $sth->finish(); $dbh->disconnect();


Reply With Quote
