You are here

function search_api_server_disable in Search API 7

Disables a search server.

Will also disable all associated indexes and remove them from the server.

Parameters

string|int $id: The ID or machine name of the server to disable.

Return value

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

File

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

Code

function search_api_server_disable($id) {
  $server = search_api_server_load($id, TRUE);
  $ret = $server
    ->update(array(
    'enabled' => 0,
  ));
  return $ret ? 1 : $ret;
}