# updateByQuery only success on the 2nd run

**URL:** <https://discuss.elastic.co/t/updatebyquery-only-success-on-the-2nd-run/124472>\
**Category:** Elasticsearch\
**Created:** [March 19, 2018, 1:47am UTC](https://discuss.elastic.co/t/updatebyquery-only-success-on-the-2nd-run/124472 "2018-03-19T01:47:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChopperLee2011](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chopperlee2011/32/28913_2.png) [@ChopperLee2011](https://discuss.elastic.co/u/ChopperLee2011)\
**Post date:** [March 19, 2018, 1:47am UTC](https://discuss.elastic.co/t/updatebyquery-only-success-on-the-2nd-run/124472/1 "2018-03-19T01:47:31Z")

</div>

I am using the javascript SDK version 6.1, and when I calling `updateByQuery` method, it is strange that it do return a success result with `version_conflicts: 1` field, but do not update my data. and the 2nd time running the same method with same param, it will return a success result with `version_conflicts: 0` success result, and update as expected.  
I have set { conflicts: 'proceed', refresh: true } but seems not work, anyone

---

<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:** [April 16, 2018, 1:47am UTC](https://discuss.elastic.co/t/updatebyquery-only-success-on-the-2nd-run/124472/2 "2018-04-16T01:47:41Z")

</div>

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