Welcome! Log In Create A New Profile

Advanced

Automatically clean keywords?

Posted by huseurdaddy2001 
Automatically clean keywords?
April 25, 2007 09:22PM
Hello,

Does Sphider automatically cleans keywords and links that are not associated with any sites after re-indexing a site?

Is it possible to automate cleaning keywords and links through cron?

A million thanks.

Rizwan Ali
Tec
Re: Automatically clean keywords?
April 26, 2007 08:56PM
No, during re-indexing database keywords and links are not automatically cleaned.

To clean keywords from command line use:

.../admin/admin.php?f=15

To clean links from command line use:

.../admin/admin.php?f=16

Tec
Re: Automatically clean keywords?
April 29, 2007 11:01PM
.../admin/admin.php?f=15

Doesn't work from command line. It simply spews the admin.php front page.
Tec
Re: Automatically clean keywords?
April 30, 2007 06:34AM
Strange. In my application it answers e.g. "Keywords table cleaned, 4 keywords deleted." All no longer associated keywords are deleted. Ensure, that you have access to admin (Sphider Admin Login).
Tec
Re: Automatically clean keywords?
May 03, 2007 04:19AM
Still, no luck and I do have access to Sphider Admin.
Tec
Re: Automatically clean keywords?
May 03, 2007 03:45PM
Is 'Clean keywords' working as command in admin section?
Do you have access to other command-line directives like Reindex?
If not, you might have a non-Sphider problem.
If yes, please login as admin. Navigate to 'Clean tables'. Move your mouse over ''Clean keywords' but don't click on it. Notice the compete directive now shown in the status-bar of your browser. Take this as directive for your command-line. It should be the same as I posted before, including the whole path to your folder /admin/
I hope it will work now.

Tec
Re: Automatically clean keywords?
May 08, 2007 06:24AM
insert the following code

if (isset($_SERVER['argv']) && $_SERVER['argc'] >= 2) {
$command_line = 1;
$ac = 1; //argument counter
while ($ac < (count($_SERVER['argv']))) {
$arg = $_SERVER['argv'][$ac];

if ($arg == '-f') {
$f = $_SERVER['argv'][$ac+1];
$ac= $ac+2;
}

}
}

at the beginning of admin.php right after

set_time_limit (0);


then you may use the command line

php admin.php -f xx

where xx replaces the function you wish to pass.

This is not a clean workaround.... this one needs definately to be cleaned up.... as a lot of junk is still echoed! But for the time being it works!

Bye the way! be patient don't CTRL-C the script! Wait until finished!

It will show a lot of HTML stuff but somewhere at the end after execution you will find "Links table cleaned..." or whatsoever command response you have give!

Have fun!

A.
Re: Automatically clean keywords?
May 25, 2007 03:21AM
Thanks, works like a charm!
Anonymous User
Re: Automatically clean keywords?
June 12, 2007 07:49PM
This is about real answers.
Sorry, only registered users may post in this forum.

Click here to login