In topic: Parallel execution of bulk request it was clarified that if a bulk contains multiple operations on the same document then they are processed in order.
On the other hand in documentation I did not find anything that confirms such behavior. The only thing that I have found was: the bulk API’s response contains the individual results of each operation in the request, returned in the order submitted.
Can I rely on processing of operations on the same document in order they appear in the bulk, or it is undocumented feature that may become subject of change in the future?
I believe the operations will be processed in order as the post you linked to describes. Sending multiple updates to the same document in a short period of time, e.g. in a single bulk request, as far as I know adds a lot of overhead as lots of very small segments are created and therefore is very inefficient. You should, as also outlined in the post you linked to, avoid doing this at all cost.
Thank you for your response.
My concern is if I can rely on this behavior or it can be changed by Elasticsearch team at the moment they decide to do it for any reason and, since it is not documented, it will not be considered as breaking changes.