You are here

public function SearchApiServer::deleteItems in Search API 7

Deletes indexed items from this server.

If an exception in the service class implementation of this method occurs, it will be caught and the operation saved as an pending server task.

See also

SearchApiServiceInterface::deleteItems()

search_api_server_tasks_add()

File

includes/server_entity.inc, line 343
Contains SearchApiServer.

Class

SearchApiServer
Class representing a search server.

Code

public function deleteItems($ids = 'all', SearchApiIndex $index = NULL) {
  $this
    ->ensureProxy();
  try {
    $this->proxy
      ->deleteItems($ids, $index);
  } catch (SearchApiException $e) {
    $vars = array(
      '%server' => $this->name,
    );
    watchdog_exception('search_api', $e, '%type while deleting items from server %server: !message in %function (line %line of %file).', $vars);
    search_api_server_tasks_add($this, __FUNCTION__, $index, $ids);
  }
}