# NEST - UpdateByQuery

**URL:** https://discuss.elastic.co/t/nest-updatebyquery/105744
**Category:** Elasticsearch
**Created:** [October 30, 2017, 10:53am UTC](https://discuss.elastic.co/t/nest-updatebyquery/105744 "2017-10-30T10:53:29Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Illidan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/illidan/32/54264_2.png) [@Illidan](https://discuss.elastic.co/u/Illidan)
#### Post date: [October 30, 2017, 10:53am UTC](https://discuss.elastic.co/t/nest-updatebyquery/105744/1 "2017-10-30T10:53:29Z")

</div>

Is there any "strong typed" way to tell what I want to update during 'UpdateByQuery' operation?

I find only 'Script' property which accepts a script text.

I prefer to avoid "free texts" as much as possible (free text == bugs).

---

<div class="post-metadata">

### Author: ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)
#### Post date: [November 5, 2017, 11:38pm UTC](https://discuss.elastic.co/t/nest-updatebyquery/105744/2 "2017-11-05T23:38:47Z")

</div>

The [Update By Query API](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html) only exposes making updates through scripts, and this is what the NEST API exposes too. It's not possible to strongly type scripts within NEST

---

<div class="post-metadata">

### Author: ![Illidan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/illidan/32/54264_2.png) [@Illidan](https://discuss.elastic.co/u/Illidan)
#### Post date: [November 17, 2017, 10:23am UTC](https://discuss.elastic.co/t/nest-updatebyquery/105744/3 "2017-11-17T10:23:45Z")

</div>

Got you. I suggest to add this remark to NEST documentation, because it is something not obvious.

---

<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 15, 2017, 10:23am UTC](https://discuss.elastic.co/t/nest-updatebyquery/105744/4 "2017-12-15T10:23:52Z")

</div>

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