You are here

function drush_search_api_enable in Search API 8

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

Enables one or more search indexes.

Parameters

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

File

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

Code

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