Hi Guys,
I'm writing component at the moment that is basically a glorified ingest pipeline. We use the _bulk
endpoint extensively. Currently, just prior to invocation, we store a map of _index+_id -> document
and then compare the response of _bulk
to it to determine which documents were successfully stored.
Now, the problem we are encountering is that we are using aliases, and the _bulk
API returns the _index
that was actually used, not the alias that was requested, so our map-based approach doesn't work.
After Googling around a bit, I was surprised to discover that the _bulk
API seems to guarantee the order of the responses, in that the order responses are reported is the same order they were originally requested. This works great for us, and we can get rid of this map-based lookup approach.
Problem is: it's not officially documented anywhere. I can only find answers in this forum saying that it's guaranteed, but I'm hesitant to rely on this semantic until it is officially stated in the documentation (losing any data would be a real problem for us).
Could you guys please update the _bulk
API page to officially state that the order is preserved (and that it won't be changed without a breaking change notification)?
Thanks!