# Set max\_result\_window through NEST

**URL:** <https://discuss.elastic.co/t/set-max-result-window-through-nest/163590>\
**Category:** Elasticsearch\
**Created:** [January 9, 2019, 5:04pm UTC](https://discuss.elastic.co/t/set-max-result-window-through-nest/163590 "2019-01-09T17:04:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joao\_Neto](https://avatars.discourse-cdn.com/v4/letter/j/a9a28c/32.png) [@Joao\_Neto](https://discuss.elastic.co/u/Joao_Neto)\
**Post date:** [January 9, 2019, 5:04pm UTC](https://discuss.elastic.co/t/set-max-result-window-through-nest/163590/1 "2019-01-09T17:04:57Z")

</div>

Hello

Is it possible to set or update the max\_result\_window through the NEST API?

---

<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:** [January 11, 2019, 10:19pm UTC](https://discuss.elastic.co/t/set-max-result-window-through-nest/163590/2 "2019-01-11T22:19:31Z")

</div>

Since [`max_result_window` is a dynamic index setting](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#dynamic-index-settings), you can update it with

```auto
var client = new ElasticClient();

var updateIndexSettingsResponse = client.UpdateIndexSettings("index_name", u => u
    .IndexSettings(di => di
        .Setting("index.max_result_window", 20000)
    )
);

```

---

<div class="post-metadata">

**Author:** ![Joao\_Neto](https://avatars.discourse-cdn.com/v4/letter/j/a9a28c/32.png) [@Joao\_Neto](https://discuss.elastic.co/u/Joao_Neto)\
**Post date:** [January 14, 2019, 8:48am UTC](https://discuss.elastic.co/t/set-max-result-window-through-nest/163590/3 "2019-01-14T08:48:05Z")

</div>

Thanks Russ!  
Got it working, thank you so much

---

<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:** [February 11, 2019, 8:48am UTC](https://discuss.elastic.co/t/set-max-result-window-through-nest/163590/4 "2019-02-11T08:48:06Z")

</div>

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