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

**URL:** <https://discuss.elastic.co/t/looking-for-documentation-on-usage-of-atomic-feature-present-in-bulk-processor/82281>\
**Category:** Elasticsearch\
**Created:** [April 13, 2017, 11:41am UTC](https://discuss.elastic.co/t/looking-for-documentation-on-usage-of-atomic-feature-present-in-bulk-processor/82281 "2017-04-13T11:41:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![anshulagrawal](https://avatars.discourse-cdn.com/v4/letter/a/c89c15/32.png) [@anshulagrawal](https://discuss.elastic.co/u/anshulagrawal)\
**Post date:** [April 13, 2017, 11:41am UTC](https://discuss.elastic.co/t/looking-for-documentation-on-usage-of-atomic-feature-present-in-bulk-processor/82281/1 "2017-04-13T11:41:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bleskes](https://avatars.discourse-cdn.com/v4/letter/b/71c47a/32.png) [@bleskes](https://discuss.elastic.co/u/bleskes)\
**Post date:** [April 21, 2017, 7:03am UTC](https://discuss.elastic.co/t/looking-for-documentation-on-usage-of-atomic-feature-present-in-bulk-processor/82281/2 "2017-04-21T07:03:06Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![anshulagrawal](https://avatars.discourse-cdn.com/v4/letter/a/c89c15/32.png) [@anshulagrawal](https://discuss.elastic.co/u/anshulagrawal)\
**Post date:** [April 22, 2017, 12:42pm UTC](https://discuss.elastic.co/t/looking-for-documentation-on-usage-of-atomic-feature-present-in-bulk-processor/82281/3 "2017-04-22T12:42:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bleskes](https://avatars.discourse-cdn.com/v4/letter/b/71c47a/32.png) [@bleskes](https://discuss.elastic.co/u/bleskes)\
**Post date:** [April 22, 2017, 2:19pm UTC](https://discuss.elastic.co/t/looking-for-documentation-on-usage-of-atomic-feature-present-in-bulk-processor/82281/4 "2017-04-22T14:19:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anshulagrawal](https://avatars.discourse-cdn.com/v4/letter/a/c89c15/32.png) [@anshulagrawal](https://discuss.elastic.co/u/anshulagrawal)\
**Post date:** [April 22, 2017, 3:13pm UTC](https://discuss.elastic.co/t/looking-for-documentation-on-usage-of-atomic-feature-present-in-bulk-processor/82281/5 "2017-04-22T15:13:30Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![bleskes](https://avatars.discourse-cdn.com/v4/letter/b/71c47a/32.png) [@bleskes](https://discuss.elastic.co/u/bleskes)\
**Post date:** [April 22, 2017, 3:58pm UTC](https://discuss.elastic.co/t/looking-for-documentation-on-usage-of-atomic-feature-present-in-bulk-processor/82281/6 "2017-04-22T15:58:26Z")

</div>

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

---

<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:** [May 20, 2017, 4:12pm UTC](https://discuss.elastic.co/t/looking-for-documentation-on-usage-of-atomic-feature-present-in-bulk-processor/82281/7 "2017-05-20T16:12:56Z")

</div>

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