search_cron()
Implements hook_cron().
Fires updateIndex() in the plugins for all indexable active search pages, and cleans up dirty words.
See also
File
- core/modules/search/search.module, line 187
- Enables site-wide keyword searching.
Code
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'); /** @var $search_page_repository \Drupal\search\SearchPageRepositoryInterface */ $search_page_repository = \Drupal::service('search.search_page_repository'); foreach ($search_page_repository->getIndexableSearchPages() as $entity) { $entity->getPlugin()->updateIndex(); } }
Please login to continue.