I'm trying the following and receiving an error:
$params['index'] = 'my_index';
$params['type'] = 'my_type';
$params['id'] = 'document_id';
$params['body'] = array('existing_key' => 'new_value');
$results = $client->update($params);
and I'm receiving the following error:
{"error":"ActionRequestValidationException[Validation Failed: 1: script or doc is missing;]","status":500}
I found that you can do this changing the body line to
$params['body']['doc'] = array('existing_key' => 'new_value');
Most helpful comment
I found that you can do this changing the body line to