// docs/update.asciidoc:114

[source, php]
----
$params = [
    'index' => 'test',
    'id' => '1',
    'body' => [
        'script' => [
            'source' => 'ctx._source.tags.add(params.tag)',
            'lang' => 'painless',
            'params' => [
                'tag' => 'blue',
            ],
        ],
    ],
];
$response = $client->update($params);
----
