You are here

public function SearchApiCommands::enable in Search API 8

Enables one disabled search index.

@command search-api:enable

@usage drush search-api:enable node_index Enable the search index with the ID node_index.

@aliases sapi-en,search-api-enable

Parameters

string $indexId: A search index ID.

Throws

\Drupal\search_api\ConsoleException Thrown if no indexes could be loaded.

File

src/Commands/SearchApiCommands.php, line 107

Class

SearchApiCommands
Defines Drush commands for the Search API.

Namespace

Drupal\search_api\Commands

Code

public function enable($indexId) {
  $this->commandHelper
    ->enableIndexCommand([
    $indexId,
  ]);
}