# Unable to create index in ElastAlert due to max\_result\_window error

**URL:** <https://discuss.elastic.co/t/unable-to-create-index-in-elastalert-due-to-max-result-window-error/48710>\
**Category:** Elasticsearch\
**Created:** [April 28, 2016, 4:48pm UTC](https://discuss.elastic.co/t/unable-to-create-index-in-elastalert-due-to-max-result-window-error/48710 "2016-04-28T16:48:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadik\_s](https://avatars.discourse-cdn.com/v4/letter/s/8e8cbc/32.png) [@Sadik\_s](https://discuss.elastic.co/u/Sadik_s)\
**Post date:** [April 28, 2016, 4:48pm UTC](https://discuss.elastic.co/t/unable-to-create-index-in-elastalert-due-to-max-result-window-error/48710/1 "2016-04-28T16:48:34Z")

</div>

Hi All,

```
    We are trying to create alert mechanism using ElastAlert and we followed all the steps of installation and also tried our best to create index in ElastAlert. But while running create-elast-alert command , we are getting below error in ElastAlert command prompt. 

```

 ![](https://us1.discourse-cdn.com/elastic/original/2X/9/9d756d6854d47918c858ba281db503e5e4451f00.png)

Also see the screenshot of Elasticsearch sever log in below screenshort.

 ![](https://us1.discourse-cdn.com/elastic/original/2X/6/617e84c295a87cd81b680140375f3ac16d6cab42.png)

We also tried to update index by using below CURL command but it is not updating max\_result\_window .

C:\>curl -X PUT "[http://localhost:9200/sadik](http://localhost:9200/sadik)" -d '{ "settings": { { "inde  
x.number\_of\_shards": 1, "index.number\_of\_replicas": 1,"index.max\_result\_win  
dow" : 2147483647 }

Also followed these steps to update index settings - [https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html)

We are really stuggling to get it work and tried all possible ways but unable to create index in ElastAlert.

Please need your help urgently on this error.

How to overcome max\_result\_window?... Please provide the solution.

---

<div class="post-metadata">

**Author:** ![yuan0122](https://avatars.discourse-cdn.com/v4/letter/y/b9bd4f/32.png) [@yuan0122](https://discuss.elastic.co/u/yuan0122)\
**Post date:** [April 28, 2016, 6:37pm UTC](https://discuss.elastic.co/t/unable-to-create-index-in-elastalert-due-to-max-result-window-error/48710/2 "2016-04-28T18:37:23Z")

</div>

I have the same problem creating index in ElastAlert.

I have an index, a type and some documents in ES. And hope to send spike alert. I have totally the same error as you got. I also tried to update index.max\_result\_window but still no luck.

Hope to get some answers here!

---

<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:** [July 5, 2017, 10:55pm UTC](https://discuss.elastic.co/t/unable-to-create-index-in-elastalert-due-to-max-result-window-error/48710/3 "2017-07-05T22:55:27Z")

</div>


