# How to add url parameters to elasticsearch UpdateByQuery in elasticsearch

**URL:** <https://discuss.elastic.co/t/how-to-add-url-parameters-to-elasticsearch-updatebyquery-in-elasticsearch/181118>\
**Category:** Elasticsearch\
**Created:** [May 15, 2019, 8:26am UTC](https://discuss.elastic.co/t/how-to-add-url-parameters-to-elasticsearch-updatebyquery-in-elasticsearch/181118 "2019-05-15T08:26:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![blueren](https://avatars.discourse-cdn.com/v4/letter/b/ecae2f/32.png) [@blueren](https://discuss.elastic.co/u/blueren)\
**Post date:** [May 15, 2019, 8:26am UTC](https://discuss.elastic.co/t/how-to-add-url-parameters-to-elasticsearch-updatebyquery-in-elasticsearch/181118/1 "2019-05-15T08:26:06Z")

</div>

Hello,

I have a nodejs app that calls ES's updateByQuery API like below:

```auto
elasticsearchClient.updateByQuery({
            index: 'logstash-dev-2019.05.14',
            body: {
                "query": {
                    "ids": {
                        "values": alert.esId
                    }
                },
                "script": {
                    "source": `ctx._source.alertObject.violation_status = 'closed'`,
                    "lang": "painless"
                }
            }
        });

```

However occasionally, I run into `version_conflict_engine_exception` . I want to proceed with the conflict by using `conflict=proceed` as mentioned in the [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html#docs-update-by-query). Where do I fit this into my update call?

---

<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:** [June 12, 2019, 8:31am UTC](https://discuss.elastic.co/t/how-to-add-url-parameters-to-elasticsearch-updatebyquery-in-elasticsearch/181118/2 "2019-06-12T08:31:55Z")

</div>

Closed on June 12, 2019, 8:31am UTC

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