Update single data in Elasticsearch.

@param  array  $data
@return \ElasticSearchClient\ElasticSearchClient
559809
public function updateNode($con, $insertId, $tableName = null)
    {
        $this->validate(['con' => $con, 'tableName' => $tableName, 'insertId' => $insertId]);
        
        if ($this->queryChanged) {
            $query = $this->selectQuery." WHERE ".$this->idColumn." = ". $insertId;
        } else {
            $query = $this->selectQuery.$tableName." WHERE ".$this->idColumn." = ". $insertId;
        }
        
        $data = $this->con->getData($con, $query);
        
        $params = [
            'index' => $this->client->getIndex(),
            'type'  => $this->client->getType(),
            'id'    => $data[0][$this->idColumn],
            'body'  => ['doc' => $data[0]]
        ];
        
        $responses = $this->client->getClient()->update($params);
        return $responses['result'];
    }
253276
public function updateStore($data = [])
    {
        $client = $this->getClient();
        $errors = [];

        $result = $client->patch($this->getCurrentStore(), $data);

        $errors = array_merge($errors, $client->getErrors($result));
        if (count($errors)) {
            Injector::inst()->get(LoggerInterface::class)->error('updateStore errors - ' . json_encode($errors));
        }
    }
28164
public function updateWhereData($data) {
        $this->performed = false;
        $this->whereData = array_merge($this->whereData, $data);

        return $this;
    }
210716
public function updateData(array $data) {
        foreach($data as $name => $value) {
            $this->data[$name] = $value;
        }
    }
98412
public function setMany(array $data)
    {
        foreach($data as $key => $value) {
            $this->_data[$key] = $value;
        }

        return $this;
    }
1103266
public static function createFromArray(array $data)
    {
        $self = new self();

        foreach ($data as $searchResult) {
            $self->addSearchResult(KeySearchResult::createFromArray($searchResult));
        }

        return $self;
    }
870789
public function update(array $data)
    {
        $upload = Basecamp::uploads($this->bucket->id)
                          ->update($this->id, $data);

        $this->setAttributes($upload);

        return $upload;
    }
623476
public function setRawData(array $data)
    {
        $this->data = $data + $this->data;

        if ($data) {
            $this->loaded = true;
            $this->setDataSource('*', 'db');
        }

        return $this;
    }
1004090
public function insertUpdate(array $data)
    {
        $affected = $this->update($data);
        return $affected ?: $this->insert($data);
    }
310345
public function update(array $data)
    {
        $this->attributes = new Collection(array_merge($this->attributes->toArray(), $data));

        return $this->save();
    }
102848
public function setData(array $data)
    {
        if (isset($data['name'])) {
            $this->setName($data['name']);
        }

        if (isset($data['active'])) {
            $this->setActive($data['active']);
        }

        return $this;
    }
1326744
public function update(array $data) {
        $statement = new UpdateStatement($data);
        $statement->setStatementContext($this->statementContext);
        $statement->setCondition($this->condition);
        $sql = $statement->parse();

        $rowCount = $this->connection->execute($sql, $this->statementContext->getParameters());

        $this->clear();

        return $rowCount;
    }
617627
public function update(array $data)
    {
        if (is_null($this->schema)) {
            throw SystemException::forNoSchema();
        }

        $table = $this->schema->getName();
        $updated = $this->schema->getUpdatedFieldName();

        if ($updated) {
            $data[$updated] = date('Y-m-d H:i:s');
        }

        return $this
            ->resource
            ->model($data)
            ->save($table)
            ->get();
    }
1339131
public function update(array $data)
    {
        if (empty($data)) {
            return null;
        }

        if (!array_key_exists('id', $data) || !array_key_exists('email', $data)) {
            return null;
        }

        $data['api_action'] = 'contact_edit';
        $response = $this->request($data, 'POST');

        if ($response === null || $response->getStatusCode() !== 200) {
            return null;
        }

        $json = $response->getBody()->getContents();

        return $this->serializer->deserialize(
            $this->removeResultInformation($json),
            \FondOfPHP\ActiveCampaign\DataTransferObject\Contact::class,
            'json'
        );
    }
943100
public function update(array $data)
    {
        $messageType = Basecamp::messageTypes($this->bucket->id)
                               ->update($this->id, $data);

        $this->setAttributes($messageType);

        return $messageType;
    }
855609
public function update($data)
    {
        $response = $this->api->put($this->url(), $data);
        $this->data = (array) $response->data;

        return $this;
    }
410407
public function update(array $data)
    {
        $todolist = Basecamp::todoLists($this->bucket->id)
                            ->update($this->id, $data);

        $this->setAttributes($todolist);

        return $todolist;
    }