Welcome! Log In Create A New Profile

Advanced

Reindexing leaves old links

Posted by actechbooks 
Reindexing leaves old links
March 17, 2011 11:27PM
I need to reindex the search results on my website frequently because some products we sell are no longer available or new products are added, etc... but I've realized that old links that are no longer active (404 page) are still kept in the index. How do I go about reindexing accurately without having to delete the index each time?

Thanks!
sarah
Re: Reindexing leaves old links
March 17, 2011 11:59PM
I solved my issue by searching through the forums. Will just add a slash "/" in the "what not to include" section and then index to remove everything. Then will reindex again without the slash.

If someone has a cleaner solution, please let me know though.

Thanks!
[SOLVED] Re: Reindexing leaves old links
June 11, 2011 01:20PM
I had the same problem with version 1.3.1 and solved it:
there was a bug in admin.php, in function cleanLinks().
(I had made many changes, but it should be around line 520)

The 11th line of the function is:

$sql_end = " not in ($todelete)";

It should be:

$sql_end = " in ($todelete)";

To eliminate removed pages from the Index you should Clean Links and then Reindex.

The cleanLinks function itself is highly inefficient: it first checks current site and then deletes links one by one just to tell the user how many links have been deleted.
As I only have one site, I just empty the keywords and the links tables, but I suggest you to delete all the links with a single sql statement: it will not kepp the server busy for all those precious seconds!
You can retrieve the number of records to delete with a SELECT statement just before deleting.



Edited 1 time(s). Last edit at 06/11/2011 01:21PM by mpamiro.
Re: [SOLVED] Re: Reindexing leaves old links
June 21, 2011 05:45AM
I tried that and now get a "server has gone away" error about halfway through the re-index.

[www.clickraider.com]
Sorry, only registered users may post in this forum.

Click here to login