You are here

public function Acquia_Search_Service::add in Acquia Search 6

Raw Add Method. Takes a raw post body and sends it to the update service. Post body should be a complete and well formed "add" xml document.

@override

Parameters

string $rawPost:

Return value

Apache_Solr_Response

Throws

Exception If an error occurs during the service call

File

./Acquia_Search_Service.php, line 37

Class

Acquia_Search_Service
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 add($rawPost) {
  if (variable_get('apachesolr_read_only', 0)) {
    throw new Exception('Operating in read-only mode; updates are disabled.');
  }
  return $this
    ->_sendRawPost($this->_updateUrl, $rawPost);
}