Do you really delete the search index every cron run?
robertDouglass - October 16, 2008 - 11:47
| Project: | Multisite Search |
| Version: | 6.x-1.1 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
The way I read the cron hook of this module, it seems that you delete the entire search index every cron run, select the entire search index from each of the multi sites, and insert them back into the multisite search. Is this true?
Have you tried this with many multi sites and reasonably large indexes? I can't imagine that this will scale (feel free to argue otherwise!)
Also, the search index is not supposed to have distinct words in it so I think it is quite possible that this line is a bug:
<?php
// ?????? how to proceed with this in a better way
// insert into search total -- need to have done without cron job
$res3 = db_query("SELECT DISTINCT (word) FROM multisite_drupal_search_index");
?>But I'll let you judge since I'm not wholly familiar with the way the module is supposed to work.

#1
How to handle the deleted node's content in search result. May be because of that reason whole thing is being deleted.
#2
I hope this module works on single database multi site concept, and aggregates the search tables of all other sites on the base site.
In that case if a node is deleted on one site then it is probably not updating the search tables of the multisite module and hence that could be the reason whole table is truncated & rebuilt from search tables of other sites.
A work around could be to delete the rows from the search tables of multisite module whenever a node is deleted from the source site. Probably then you may not want to truncate & re-build the search tables all over again.
#3
I'm trying to use this module on a multisite installation with about 220 other sites (they are all new and have very little content in them) and when cron runs, this module causes cron to exceed the time limit and then abort. I don't know if the module is being maintained but in its current form it's not going to work for large sites.
#4
grawat: you may be better off using ApacheSolr which also has a multisite search capability.
#5
thanks.