public function deleteDocument($rid, $version = null, $database = null)
{
$headers = null;
if ($version) {
$headers = array('If-Match' => $version);
}
$location = $this->getDocumentLocation($database ?: $this->database, $rid);
return $this->adapter->request('DELETE', $location, $headers);
}