public function update(array $data, array $parameters = []) {
        if (!$this->canAlter()) {
            throw new Exception('Need index, type, and key to update a document');
        }
        if (!$this->esClient) {
            throw new Exception('Need ElasticSearch client object for ALTER operations');
        }
        $params = [
            'index' => $this->meta['index'],
            'type' => $this->meta['type'],
            'id' => $this->meta['id'],
            'body' => $data] + $parameters;
        return $this->esClient->update($params);
    }