# Order of actions in Bulk API via http between request and response is guaranteed?

**URL:** <https://discuss.elastic.co/t/order-of-actions-in-bulk-api-via-http-between-request-and-response-is-guaranteed/122499>\
**Category:** Elasticsearch\
**Created:** [March 5, 2018, 11:57am UTC](https://discuss.elastic.co/t/order-of-actions-in-bulk-api-via-http-between-request-and-response-is-guaranteed/122499 "2018-03-05T11:57:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wreulicke](https://avatars.discourse-cdn.com/v4/letter/w/cab0a1/32.png) [@wreulicke](https://discuss.elastic.co/u/wreulicke)\
**Post date:** [March 5, 2018, 11:57am UTC](https://discuss.elastic.co/t/order-of-actions-in-bulk-api-via-http-between-request-and-response-is-guaranteed/122499/1 "2018-03-05T11:57:44Z")

</div>

I am writing code to index some document using Bulk API.  
In my case, I would like to retry to index in failed actions.

There are no guarantee that it is equals to order of actions between request and response?  
(not execution order)

I seems that execution order is not guaranteed but orders between are guaranteed in followings.

> [@Is the execution order guaranteed in a single\_bulk request?](https://discuss.elastic.co/t/is-the-execution-order-guaranteed-in-a-single-bulk-request/100412):
>
> Continuing the discussion from [Are bulk index operations serialized?](https://discuss.elastic.co/t/are-bulk-index-operations-serialized/83770/6): Is this also true for several elements of one \_bulk command? If my request (one request) has action A, then B and then C (in this order) don't I have the guarantee that the order is preserved?

> [@Ordering of responses in the Bulk Api](https://discuss.elastic.co/t/ordering-of-responses-in-the-bulk-api/13264):
>
> I'm wondering if it is guaranteed that the responses that I get back from the bulk-api have the very same ordering as my individual request that I sent in. If not, is there any way to connect an individual response to an individual request? If yes, and if I did not look over it, it might be a good idea to put this in the documentation. Thanks, Peter -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and st…

This guarantee was not a things of the past?  
Currently, Elasticsearch have guaranteed the equality of order between request and response in Bulk API yet?

> [@Ordering of responses in the Bulk Api](https://discuss.elastic.co/t/ordering-of-responses-in-the-bulk-api/13264):
>
> I'm wondering if it is guaranteed that the responses that I get back from the bulk-api have the very same ordering as my individual request that I sent in. If not, is there any way to connect an individual response to an individual request? If yes, and if I did not look over it, it might be a good idea to put this in the documentation. Thanks, Peter -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and st…

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [March 7, 2018, 5:03pm UTC](https://discuss.elastic.co/t/order-of-actions-in-bulk-api-via-http-between-request-and-response-is-guaranteed/122499/2 "2018-03-07T17:03:03Z")

</div>

The order of the elements is the same. If the 1000th request in your bulk request failed, you will be able to check this in the 1000th element of the response array structure.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 4, 2018, 5:03pm UTC](https://discuss.elastic.co/t/order-of-actions-in-bulk-api-via-http-between-request-and-response-is-guaranteed/122499/3 "2018-04-04T17:03:20Z")

</div>

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