You are here

function drush_search_api_disable in Search API 8

Same name and namespace in other branches
  1. 7 search_api.drush.inc \drush_search_api_disable()

Disables one or more search indexes.

Parameters

string|null $index_id: The ID of a search index to disable. Or NULL (only used internally) to disable all enabled indexes.

File

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

Code

function drush_search_api_disable($index_id = NULL) {
  $command_helper = _search_api_drush_command_helper();
  try {
    $command_helper
      ->disableIndexCommand([
      $index_id,
    ]);
  } catch (ConsoleException $exception) {
    drush_set_error($exception
      ->getMessage());
  }
}