Order of documents in the bulk

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
Opensearch 2.12.0
Opensearch Dashboards 2.12.0
Debian 12 x64

Describe the issue:

Hi everyone. I have a tool that pushes events to a bulk and then sends them to opensearch. I iterate over the response I get from the previous POST request to look for error messages that may have occurred during indexing. I want to relate the error message to the document in the bulk that caused it. To do this I need to know if the order within the array returned by the POST request is in line with the order of the documents within the bulk.

Hey @nahuel97 ,

Sorry that I have to quote the Elasticsearch documentation [1] (but these are the guarantees OpenSearch inherited):

 items

    (array of objects) Contains the result of each operation in the bulk request, in the order they were submitted. 

[1] Bulk API | Elasticsearch Guide [7.10] | Elastic