Service/Crud.php
public function update(Repository $repository, $id, array $data)
    {
        $repository->getManager()->bulk(
            'update',
            $repository->getType(),
            [
                '_id' => $id,
                'doc' => $data,
                'doc_as_upsert' => true
            ]
        );
    }
public function update(Repository $repository, $id, array $data)
    {
        $repository->getManager()->bulk(
            'update',
            $repository->getType(),
            [
                '_id' => $id,
                'doc' => $data,
                'doc_as_upsert' => true
            ]
        );
    }
{@inheritdoc}