You are here

public function Apache_Solr_Service_Balancer::delete in Apache Solr Search 5

Raw Delete Method. Takes a raw post body and sends it to the update service. Body should be a complete and well formed "delete" xml document

Parameters

string $rawPost:

Return value

Apache_Solr_Response

Throws

Exception If an error occurs during the service call

File

SolrPhpClient/Apache/Solr/Service/Balancer.php, line 586

Class

Apache_Solr_Service_Balancer
Reference Implementation for using multiple Solr services in a distribution. Functionality includes: routing of read / write operations failover (on selection) for multiple read servers

Code

public function delete($rawPost) {
  $service = $this
    ->_selectWriteService();
  do {
    try {
      return $service
        ->delete($rawPost);
    } catch (Exception $e) {
      if ($e
        ->getCode() != 0) {

        //IF NOT COMMUNICATION ERROR
        throw $e;
      }
    }
    $service = $this
      ->_selectWriteService(true);
  } while ($service);
  return false;
}