You are here

function panopoly_search_update_7003 in Panopoly Search 7

Panopoly Beta 5 Update: Updating Search API DB Search System

File

./panopoly_search.install, line 88
Installation file for Panopoly Search

Code

function panopoly_search_update_7003(&$sandbox) {
  $database_server = search_api_server_load('database_server');
  if ($database_index = search_api_index_load('database_node_index')) {
    $database_server
      ->fieldsUpdated($database_index);
  }
  else {
    features_revert(array(
      'panopoly_search' => array(
        'search_api_index',
      ),
    ));
  }
  return t('Panopoly\'s Search DB Search API index has been updated');
}