1// docs/update.asciidoc:153 2 3[source, php] 4---- 5$params = [ 6 'index' => 'test', 7 'id' => '1', 8 'body' => [ 9 'script' => 'ctx._source.new_field = \'value_of_new_field\'', 10 ], 11]; 12$response = $client->update($params); 13---- 14