Implements hook_cron().
Fires hook_update_index() in all modules and cleans up dirty words.
function search_cron() {
// We register a shutdown function to ensure that search_total is always up
// to date.
drupal_register_shutdown_function('search_update_totals');
foreach (config('search.settings')
->get('active_modules') as $module) {
// Update word index
module_invoke($module, 'update_index');
}
}