You are here

public function SearchApiSolrConnection::deleteById in Search API Solr 7

Sends a delete request based on a document ID.

Parameters

string $id: The ID of the document which should be deleted. Expected to be UTF-8 encoded.

int|false $timeout: Seconds to wait until timing out with an exception. Defaults to an hour.

Return value

object A response object.

Throws

SearchApiException If an error occurs during the service call.

Overrides SearchApiSolrConnectionInterface::deleteById

File

includes/solr_connection.inc, line 810

Class

SearchApiSolrConnection
Represents a Solr server resource.

Code

public function deleteById($id, $timeout = 3600) {
  return $this
    ->deleteByMultipleIds(array(
    $id,
  ), $timeout);
}