// docs/update.asciidoc:153

[source, php]
----
$params = [
    'index' => 'test',
    'id' => '1',
    'body' => [
        'script' => 'ctx._source.new_field = \'value_of_new_field\'',
    ],
];
$response = $client->update($params);
----
