0

As the 2.0 docs say, updates performed are partial - they do not override the whole document but only merge the existing one with the value given.

Is there a way to perform a full update using this API?

abyx
  • 69,862
  • 18
  • 95
  • 117
  • At Elasticsearch level, the old document gets deleted, the new one is indexed even if this is an update operation, don't forget that. https://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-update.html – Andrei Stefan Oct 15 '15 at 12:28

1 Answers1

1

Yes, you can simply re-index the document using client.index, as if it was a new document, but using the same id.

A new version of the document will be indexed and stored, which will override the one stored previously.

Val
  • 207,596
  • 13
  • 358
  • 360