Update document
- In ES, documents are immutable
- But every document maintains a
_versionfield - A updated document is a copy of the document with the
incremented_versionnumber -
The old documents get marked for deletion
-
POST WITH
_updatewill only update the changed fields. If not changes are made, the document is not udpated
curl -X POST "localhost:9200/movies/_doc/109487/_update" \
-H "Content-Type: application/json" \
-d '
{
"doc": {
"title": "Interstellar bare"
}
}
'