You are here

function search_api_index_enable in Search API 7

Enables a search index.

Parameters

string|int $id: The ID or machine name of the index to enable.

Return value

int|false 1 on success, 0 or FALSE on failure.

Throws

SearchApiException If the index's server doesn't exist.

1 call to search_api_index_enable()
drush_search_api_enable in ./search_api.drush.inc
Enable index(es).

File

./search_api.module, line 2978
Provides a flexible framework for implementing search services.

Code

function search_api_index_enable($id) {
  $index = search_api_index_load($id, TRUE);
  $ret = $index
    ->update(array(
    'enabled' => 1,
  ));
  return $ret ? 1 : $ret;
}