Java API Massive Update Bulk

Hi everyone,

I created a code to massive update script for documents apparently all working fine, but the update causes a very large use of ElasticSearch heap, to exhaust all the heap. And ElasticSearch does not recover, I have to restart the instances.

This behavior is expected, or am I doing something wrong?

Thank you

You should reduce the bulk size if that is the case.

But what is the difference between bulk insert or update, why bulk insert does not cause this problem.

An update retrieves the original document, then applies the update in memory, then reindexes the result.