# What is the name of a parameter "retry\_on\_conflict" in Bulk Update API

**URL:** <https://discuss.elastic.co/t/what-is-the-name-of-a-parameter-retry-on-conflict-in-bulk-update-api/65185>\
**Category:** Elasticsearch\
**Created:** [November 7, 2016, 9:04am UTC](https://discuss.elastic.co/t/what-is-the-name-of-a-parameter-retry-on-conflict-in-bulk-update-api/65185 "2016-11-07T09:04:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ilya\_Levin](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Ilya\_Levin](https://discuss.elastic.co/u/Ilya_Levin)\
**Post date:** [November 7, 2016, 9:04am UTC](https://discuss.elastic.co/t/what-is-the-name-of-a-parameter-retry-on-conflict-in-bulk-update-api/65185/1 "2016-11-07T09:04:17Z")

</div>

I'm performing a bulk update with parameter "retry\_on\_conflict".

In a documentation about Update API and Bulk Update and found a different naming of the same parameter.

> **[Bulk API | Elasticsearch Guide \[2.3\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/docs-bulk.html#bulk-update)**

talking about "\_retry\_on\_conflict"

> **[Update API | Elasticsearch Guide \[2.3\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/docs-update.html#_parameters_2)**

requires "retry\_on\_conflict"

What should i use?

The code example:

> type\_of\_document = "doc\_type\_AAA"  
> index\_name = "index\_AAA"  
> docid = "1234"  
> doc = {"a":1"}  
> full\_doc = {"a":1, "time":time.time()}  
> doc = {  
> '\_op\_type': 'update',  
> "\_index": index\_name,  
> "\_type": type\_of\_document,  
> "\_id": docid,  
> "\_routing": docid,  
> "doc": doc,  
> "upsert": full\_doc,  
> "\_retry\_on\_conflict": 3 # or "retry\_on\_conflict": 3 ?  
> }  
> helpers.streaming\_bulk(es\_client, [doc], chunk\_size=500)

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [November 7, 2016, 9:18am UTC](https://discuss.elastic.co/t/what-is-the-name-of-a-parameter-retry-on-conflict-in-bulk-update-api/65185/2 "2016-11-07T09:18:31Z")

</div>

Hey,

the documentation contains the version, for which the documentation is valid - in your example it is 2.1 and 2.3. Always make sure the documentation matches with the elasticsearch version you are using.

In addition you are showing the documentation for the bulk API once and once for the update API. Again make sure you have the right docs for your API call. Yours looks like the update API.

--Alex

---

<div class="post-metadata">

**Author:** ![Ilya\_Levin](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Ilya\_Levin](https://discuss.elastic.co/u/Ilya_Levin)\
**Post date:** [November 7, 2016, 9:48am UTC](https://discuss.elastic.co/t/what-is-the-name-of-a-parameter-retry-on-conflict-in-bulk-update-api/65185/3 "2016-11-07T09:48:38Z")

</div>

Agree about the version. I have fixed the initial post. The 2.3 says exactly the same as 2.1.

Yes, I'm pointed to 2 APIS that do exactly the same action on "version collision" but using the different parameter to configure it.

Very strange?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [November 7, 2016, 10:02am UTC](https://discuss.elastic.co/t/what-is-the-name-of-a-parameter-retry-on-conflict-in-bulk-update-api/65185/4 "2016-11-07T10:02:35Z")

</div>

The bulk API is consistent with all of its metadata parameters being prefixed with an underscore (whether that underscore is needed is a different issue, but for now it is there, so thats why `retry_on_conflict` has it as well).

---

<div class="post-metadata">

**Author:** ![Ilya\_Levin](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Ilya\_Levin](https://discuss.elastic.co/u/Ilya_Levin)\
**Post date:** [November 7, 2016, 10:18am UTC](https://discuss.elastic.co/t/what-is-the-name-of-a-parameter-retry-on-conflict-in-bulk-update-api/65185/5 "2016-11-07T10:18:30Z")

</div>

Thanks. I'll use as described in Bulk API.

---

<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:** [December 5, 2016, 10:18am UTC](https://discuss.elastic.co/t/what-is-the-name-of-a-parameter-retry-on-conflict-in-bulk-update-api/65185/6 "2016-12-05T10:18:35Z")

</div>

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