// docs/update.asciidoc:96

[source, php]
----
$params = [
    'index' => 'test',
    'id' => '1',
    'body' => [
        'script' => [
            'source' => 'ctx._source.counter += params.count',
            'lang' => 'painless',
            'params' => [
                'count' => 4,
            ],
        ],
    ],
];
$response = $client->update($params);
----
