# Increasing index.max\_result\_window using CentOS CLI

**URL:** <https://discuss.elastic.co/t/increasing-index-max-result-window-using-centos-cli/246432>\
**Category:** Elasticsearch\
**Created:** [August 26, 2020, 10:26am UTC](https://discuss.elastic.co/t/increasing-index-max-result-window-using-centos-cli/246432 "2020-08-26T10:26:28Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![hishan42](https://avatars.discourse-cdn.com/v4/letter/h/2bfe46/32.png) [@hishan42](https://discuss.elastic.co/u/hishan42)\
**Post date:** [August 26, 2020, 10:26am UTC](https://discuss.elastic.co/t/increasing-index-max-result-window-using-centos-cli/246432/1 "2020-08-26T10:26:28Z")

</div>

```auto
I am using graylog with mongodb and elasticsearch 6.8 on CentOS 7. 
Now I have received an error saying "Elasticsearch limits the search 
result to 10000 messages". How do I increase the index.max_result_window? 
I dont have Kibana installed and I couldnt find any CLI method in CentOS 
to increase this. 

Please help.

```

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 26, 2020, 11:20pm UTC](https://discuss.elastic.co/t/increasing-index-max-result-window-using-centos-cli/246432/2 "2020-08-26T23:20:55Z")

</div>

Welcome to our community! 😃

Try something like this, just replace the things you need to;

```auto
curl -XPUT "http://HOST:9200/INDEX/_settings" -d '{ "index" : { "max_result_window" : NUMBER } }'

```

---

<div class="post-metadata">

**Author:** ![hishan42](https://avatars.discourse-cdn.com/v4/letter/h/2bfe46/32.png) [@hishan42](https://discuss.elastic.co/u/hishan42)\
**Post date:** [August 27, 2020, 11:15am UTC](https://discuss.elastic.co/t/increasing-index-max-result-window-using-centos-cli/246432/3 "2020-08-27T11:15:21Z")

</div>

> [@warkolm](#):
>
> `curl -XPUT "http://HOST:9200/INDEX/_settings" -d '{ "index" : { "max_result_window" : NUMBER } }'`

Thanks Warkolm.

But, once I applied the command, the following error appears.

{"error":"Content-Type header [application/x-www-form-urlencoded] is not supported","status":406}

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 31, 2020, 1:42am UTC](https://discuss.elastic.co/t/increasing-index-max-result-window-using-centos-cli/246432/4 "2020-08-31T01:42:30Z")

</div>

Ahh yes, you need to add `-H "Content-Type: application/json"` as well 🙂

---

<div class="post-metadata">

**Author:** ![hishan42](https://avatars.discourse-cdn.com/v4/letter/h/2bfe46/32.png) [@hishan42](https://discuss.elastic.co/u/hishan42)\
**Post date:** [September 3, 2020, 4:39am UTC](https://discuss.elastic.co/t/increasing-index-max-result-window-using-centos-cli/246432/5 "2020-09-03T04:39:56Z")

</div>

Thanks again Warkolm.

I entered the following command.  
curl -XPUT "[http://localhost:9200/INDEX/\_settings](http://localhost:9200/INDEX/_settings)" -d '{ "index" : { "max\_result\_window" : 800000 } }' -H "Content-Type: application/json"

However, another 404 error appears as follows.

{"error":{"root\_cause":[{"type":"index\_not\_found\_exception","reason":"no such index","resource.type":"index\_or\_alias","resource.id":"INDEX","index\_uuid":"_na_","index":"INDEX"}],"type":"index\_not\_found\_exception","reason":"no such index","resource.type":"index\_or\_alias","resource.id":"INDEX","index\_uuid":"_na_","index":"INDEX"},"status":404}

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 3, 2020, 6:59am UTC](https://discuss.elastic.co/t/increasing-index-max-result-window-using-centos-cli/246432/6 "2020-09-03T06:59:28Z")

</div>

Did you change `INDEX` for the index name you want to alter the setting for?

---

<div class="post-metadata">

**Author:** ![hishan42](https://avatars.discourse-cdn.com/v4/letter/h/2bfe46/32.png) [@hishan42](https://discuss.elastic.co/u/hishan42)\
**Post date:** [September 3, 2020, 10:19am UTC](https://discuss.elastic.co/t/increasing-index-max-result-window-using-centos-cli/246432/7 "2020-09-03T10:19:19Z")

</div>

No I didn't create an index with the name "INDEX" for this max\_result\_window. If it is needed, may I know how to do that using CLI?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 3, 2020, 9:20pm UTC](https://discuss.elastic.co/t/increasing-index-max-result-window-using-centos-cli/246432/8 "2020-09-03T21:20:06Z")

</div>

You need to replace the `INDEX` in the command with the actual index name you want this setting applied to.

---

<div class="post-metadata">

**Author:** ![hishan42](https://avatars.discourse-cdn.com/v4/letter/h/2bfe46/32.png) [@hishan42](https://discuss.elastic.co/u/hishan42)\
**Post date:** [September 4, 2020, 10:26am UTC](https://discuss.elastic.co/t/increasing-index-max-result-window-using-centos-cli/246432/9 "2020-09-04T10:26:13Z")

</div>

After configuring the below, it worked.

curl -XPUT "[http://localhost:9200/\_all/\_settings](http://localhost:9200/_all/_settings)" -d '{ "index" : { "max\_result\_window" : 800000 } }' -H "Content-Type: application/json" .

Thanks for the support given.

---

<div class="post-metadata">

**Author:** ![hishan42](https://avatars.discourse-cdn.com/v4/letter/h/2bfe46/32.png) [@hishan42](https://discuss.elastic.co/u/hishan42)\
**Post date:** [September 10, 2020, 10:59am UTC](https://discuss.elastic.co/t/increasing-index-max-result-window-using-centos-cli/246432/10 "2020-09-10T10:59:02Z")

</div>

Hi Warkolm,

Sorry for reopening the case again 🙂 .

I need to reenter the following command daily otherwise it shows only 66 pages. How do I make this index value persistent?

curl -XPUT "[http://localhost:9200/\_all/\_settings](http://localhost:9200/_all/_settings)" -d '{ "index" : { "max\_result\_window" : 800000 } }' -H "Content-Type: application/json"

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 13, 2020, 10:27pm UTC](https://discuss.elastic.co/t/increasing-index-max-result-window-using-centos-cli/246432/11 "2020-09-13T22:27:45Z")

</div>

Look into index templates.

---

<div class="post-metadata">

**Author:** ![hishan42](https://avatars.discourse-cdn.com/v4/letter/h/2bfe46/32.png) [@hishan42](https://discuss.elastic.co/u/hishan42)\
**Post date:** [September 17, 2020, 11:28pm UTC](https://discuss.elastic.co/t/increasing-index-max-result-window-using-centos-cli/246432/12 "2020-09-17T23:28:13Z")

</div>

Ok I will Warkolm.

I have another concern. I have created a user called “NOC” using Graylog GUI. When logged into Graylog from NOC user, I face the same issue of viewing pages after 66. How can I increase the index of this user using CentOS CLI? Thanks

---

<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:** [October 15, 2020, 11:28pm UTC](https://discuss.elastic.co/t/increasing-index-max-result-window-using-centos-cli/246432/13 "2020-10-15T23:28:23Z")

</div>

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