Do we have two phase commit in Elastic Search

Our application was earlier using lucene which provides APIs for two phase commit (i.e prepareCommit() and commit()).

Recently, we have started using ES instead of Lucene. Do we have APIs for two phase commit in ES. If not, is there a way we can achieve two phase commit in ES.

Sort of but probably different, but why would you want to do this?

This requirement has come from our banking customer . They want to make sure the data is consistent across the nodes.

Can you suggest what sort of 2 phase commit (or equivalent) is provided by ES.

The way ES handles this is a little different, in that it's abstracted away from the user.

Take a read of https://www.elastic.co/guide/en/elasticsearch/guide/current/inside-a-shard.html