You are here

function hook_search_api_index_reindex in Search API 7

Same name and namespace in other branches
  1. 8 search_api.api.php \hook_search_api_index_reindex()

A search index was scheduled for reindexing

Parameters

SearchApiIndex $index: The edited index.

$clear: Boolean indicating whether the index was also cleared.

2 invocations of hook_search_api_index_reindex()
SearchApiIndex::clear in includes/index_entity.inc
Clears this search index and schedules all of its items for re-indexing.
SearchApiIndex::reindex in includes/index_entity.inc
Schedules this search index for re-indexing.

File

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

Code

function hook_search_api_index_reindex(SearchApiIndex $index, $clear = FALSE) {
  db_insert('example_search_index_reindexed')
    ->fields(array(
    'index' => $index->id,
    'update_time' => REQUEST_TIME,
  ))
    ->execute();
}