You are here

function hook_search_api_index_load in Search API 7

Act on search indexes when they are loaded.

Parameters

array $indexes: An array of loaded SearchApiIndex objects.

File

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

Code

function hook_search_api_index_load(array $indexes) {
  foreach ($indexes as $index) {
    db_insert('example_search_index_access')
      ->fields(array(
      'index' => $index->machine_name,
      'access_time' => REQUEST_TIME,
    ))
      ->execute();
  }
}