Update multiple field values in elasticsearch

Hi all,

I am looking to update just one field value in document,

http://host:9200/index/_update/id

{
	 "script" : "ctx._source.Surname = 'ag'"
}

this does the job for updating one field, but how to replace multiple fields , using update api.

Regards,
Mohan

Would that work?

ctx._source.Surname = 'ag'; ctx._source.Lastname = 'ag'

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.