elasticsearch/es-update-doc

Update Document

Update an existing document

elasticsearch
document
update

Command

curl -X POST 'http://localhost:9200/my_index/_update/1?pretty' -H 'Content-Type: application/json' -d '{"doc":{"name":"Jane"}}'

Examples

Update user doc

curl -X POST 'http://localhost:9200/users/_update/1?pretty' -H 'Content-Type: application/json' -d '{"doc":{"username":"bob"}}'