Looking for documentation on usage of atomic feature present in bulk processor

Hi,

I have been trying to figure out if there is a way to indicate bulk processor to execute two indexing requests in the same bulk? There is an atomic field present in library but no documentation to support its usage.

You can always build your own bulk request and send it. Do note however that the fact that two requests are in the same bulk doesn't mean that they are executed atomically. On the server there run one by one and are independent from each other. For example, if the first fail, the other will still be executed. What are you trying to achieve?

Thanks for the reply @bleskes.
We are trying to persist a message into more than one index at a time, if the request fails on one it should be rolled back on all other indices as well.

I suspected something like that. This is sadly not how it works. Bulk requests are not atomic operations. It's functionality equivalent to issuing the requests one by one from the client. Bulk are just a more efficient variant of the same.

Thanks @bleskes. So the persisting application should be handling the transaction logic ? Are there any provisions in future versions of Elastic Search to support the same?

Sadly, we current have no plans to add multi-document / multi request transactions.

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