Is the order of execution of requests inside bulk request is always constant?

If I have a document with just one field called "subject"
and I create three update requests for same document.

update request1(with upsert as entire doc):- Creates document1 with subject "abcd"
Update request2: Updates subject from "abcd" to "efgh"
Update request3: Updates subject from "efgh" to "ijkl"

and create a bulk request out of this,
Is it always executed in the same order? If at the end if I query the subject will I always get "ijkl" or is there any possibility that I will get "efgh"

Note: All these updates are for same document.

Yes, I believe the order within a bulk request will be maintained per shard. Frequently updating a single document like this will however result in worse performance as many small segments will be created, which is an expensive operation. I would recommend consolidating the update requests before sending the bulk requests.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.