function search_api_index_disable in Search API 7
Disables a search index.
Parameters
string|int $id: The ID or machine name of the index to disable.
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_disable()
- drush_search_api_disable in ./
search_api.drush.inc - Disable index(es).
File
- ./
search_api.module, line 2996 - Provides a flexible framework for implementing search services.
Code
function search_api_index_disable($id) {
$index = search_api_index_load($id, TRUE);
$ret = $index
->update(array(
'enabled' => 0,
));
return $ret ? 1 : $ret;
}