You are here

function drush_search_api_server_clear in Search API 8

Clears all search indexes on the server and marks them for reindexing.

Parameters

string $server_id: The ID of the server to clear all search indexes.

File

./search_api.drush.inc, line 411
Drush commands for Search API.

Code

function drush_search_api_server_clear($server_id = NULL) {
  $command_helper = _search_api_drush_command_helper();
  try {
    $command_helper
      ->clearServerCommand($server_id);
  } catch (ConsoleException $exception) {
    drush_print($exception
      ->getMessage());
  }
}