You are here

search.post_update.php in Drupal 9

Same filename and directory in other branches
  1. 8 core/modules/search/search.post_update.php

Post update functions for Search module.

File

core/modules/search/search.post_update.php
View source
<?php

/**
 * @file
 * Post update functions for Search module.
 */

/**
 * Implements hook_removed_post_updates().
 */
function search_removed_post_updates() {
  return [
    'search_post_update_block_page' => '9.0.0',
  ];
}

/**
 * Mark everything for reindexing after diacritics removal rule change.
 */
function search_post_update_reindex_after_diacritics_rule_change() {
  $search_page_repository = \Drupal::service('search.search_page_repository');
  foreach ($search_page_repository
    ->getIndexableSearchPages() as $entity) {
    $entity
      ->getPlugin()
      ->markForReindex();
  }
  return t("Content has been marked for re-indexing for all active search pages. Searching will continue to work, but new content won't be indexed until all existing content has been re-indexed.");
}

Functions

Namesort descending Description
search_post_update_reindex_after_diacritics_rule_change Mark everything for reindexing after diacritics removal rule change.
search_removed_post_updates Implements hook_removed_post_updates().