# Update by Query with custom query - Solved

**URL:** <https://discuss.elastic.co/t/update-by-query-with-custom-query-solved/152658>\
**Category:** Elasticsearch\
**Created:** [October 16, 2018, 12:47pm UTC](https://discuss.elastic.co/t/update-by-query-with-custom-query-solved/152658 "2018-10-16T12:47:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TomTom](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tomtom/32/3676_2.png) [@TomTom](https://discuss.elastic.co/u/TomTom)\
**Post date:** [October 16, 2018, 12:47pm UTC](https://discuss.elastic.co/t/update-by-query-with-custom-query-solved/152658/1 "2018-10-16T12:47:00Z")

</div>

is possible execute a `update_by_query` with custom query?

Example:

First  
`update_by_query where customer_id >= 1 and customer_id <= 10000;`  
Second  
`update_by_query where customer_id >= 10001 and customer_id <= 20000;`

I need to do this because I created a property in my text mapping, with a keyword field, and in it I marked the null\_value attribute to be 'N', but all the documents are still null

---

<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:** [November 13, 2018, 12:55pm UTC](https://discuss.elastic.co/t/update-by-query-with-custom-query-solved/152658/2 "2018-11-13T12:55:38Z")

</div>

Closed on November 13, 2018, 12:55pm UTC

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