You are here

function hook_search_api_index_update in Search API 7

A search index was edited in any way.

Parameters

SearchApiIndex $index: The edited index.

2 functions implement hook_search_api_index_update()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

search_api_search_api_index_update in ./search_api.module
Implements hook_search_api_index_update().
search_api_views_search_api_index_update in contrib/search_api_views/search_api_views.module
Implements hook_search_api_index_update().

File

./search_api.api.php, line 502
Hooks provided by the Search API module.

Code

function hook_search_api_index_update(SearchApiIndex $index) {
  if ($index->name != $index->original->name) {
    db_insert('example_search_index_name_update')
      ->fields(array(
      'index' => $index->machine_name,
      'update_time' => REQUEST_TIME,
    ))
      ->execute();
  }
}