You are here

public function DrupalApacheSolrService::deleteById in Apache Solr Search 8

Same name and namespace in other branches
  1. 6.3 Drupal_Apache_Solr_Service.php \DrupalApacheSolrService::deleteById()
  2. 7 Drupal_Apache_Solr_Service.php \DrupalApacheSolrService::deleteById()

Create a delete document based on document ID

Parameters

string $id Expected to be utf-8 encoded:

float $timeout Maximum expected duration of the delete operation on the server (otherwise, will throw a communication exception):

Return value

response object

Throws

Exception If an error occurs during the service call

Overrides DrupalApacheSolrServiceInterface::deleteById

File

./Drupal_Apache_Solr_Service.php, line 758

Class

DrupalApacheSolrService
Starting point for the Solr API. Represents a Solr server resource and has methods for pinging, adding, deleting, committing, optimizing and searching.

Code

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