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);
    }
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);
    }
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 ) ; }
Updates the document

@param array $data the normal elastic update parameters to be used
@param array $parameters the parameters array
@return array
@throws Exception
Updates the document