public function index($document, $id = false, array $options = array())
{
if ($id === false) {
throw new \ElasticSearch\Exception("Memcached transport requires id when indexing");
}
$document = json_encode($document);
$url = $this->buildUrl(array($this->type, $id));
$response = $this->conn->set($url, $document);
return array('ok' => $response);
}