I have about 93,000 files that are indexed by the search files module (there are 102,000+ files in the directory tree, but only 93,000 are "indexable" -- i.e. pdfs, docs, ppts, etc.). The indexing process was quite painful in that it took weeks and weeks to complete, but it is now done. The problem I am experiencing now is that even though all of the files are indexed and search works great, every time that cron.php runs now, I get this mega query that takes FOREVER to complete, if in fact it actually even does. It most certainly takes all of the cron time, and causes other modules that use cron to fail (subscriptions, in particular). Anyone have any ideas on what I can do? It seems that search files does not work very well with a large number of indexed files? Here is the query that runs every time cron runs:
SELECT
*
FROM
search_files_files
LEFT JOIN
(
SELECT
*
FROM
search_dataset
WHERE
`type` = 'search_files'
) AS `dataset` ON search_files_files.`id` = `dataset`.`sid`
WHERE
(
`dataset`.`reindex` IS NULL OR
`dataset`.`reindex` != 0
) AND search_files_files.`index_attempts` <= 5
LIMIT 20
Comments
Comment #1
spjsche commentedJust to point out that the said query is not used in the beta or dev releases of the module.
Perhaps you could test with one of them and see if it solves your problem.
Not Forgetting to backup your database first.
Thanks
Stephen