# How to get documents more than 10000 in elasticsearch for visualization?

**URL:** <https://discuss.elastic.co/t/how-to-get-documents-more-than-10000-in-elasticsearch-for-visualization/202845>\
**Category:** Kibana\
**Created:** [October 9, 2019, 2:21pm UTC](https://discuss.elastic.co/t/how-to-get-documents-more-than-10000-in-elasticsearch-for-visualization/202845 "2019-10-09T14:21:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nirajan](https://avatars.discourse-cdn.com/v4/letter/n/6bbea6/32.png) [@Nirajan](https://discuss.elastic.co/u/Nirajan)\
**Post date:** [October 9, 2019, 2:21pm UTC](https://discuss.elastic.co/t/how-to-get-documents-more-than-10000-in-elasticsearch-for-visualization/202845/1 "2019-10-09T14:21:36Z")

</div>

Hello,

I am looking for a solution to get all the records from the elasticsearch for visualization.  
It seems only 10000 documents can be visualized at a time.

I went through elasticsearch documentation and found out that "scroll" would be an option. I could use this approach in python to loop through all the documents no matter how many documents exists in elasticsearch.

But i want to get all the documents for visualization in a scatter plot and i am trying to find a way to include the main search query (which would get me default 10000 docs) together with the scroll query (which would get me the all or remaining documents). In dev tools (console) of kibana, i have to use two separate queries but not sure about the way to use these queries in scatter plot or in any other visualization tools. It seems combining these two queries together wont work.

Any suggestions would be really appreciated..

Best Regards,  
Nirajan

---

<div class="post-metadata">

**Author:** ![cjcenizal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cjcenizal/32/11216_2.png) [@cjcenizal](https://discuss.elastic.co/u/cjcenizal)\
**Post date:** [October 9, 2019, 11:08pm UTC](https://discuss.elastic.co/t/how-to-get-documents-more-than-10000-in-elasticsearch-for-visualization/202845/2 "2019-10-09T23:08:10Z")

</div>

Hi there, you should be able to increase this limit by changing the `index.max_result_window` setting in Elasticsearch. See the [docs on index settings](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#dynamic-index-settings) for more info.

---

<div class="post-metadata">

**Author:** ![Aaron\_Caldwell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron_caldwell/32/45755_2.png) [@Aaron\_Caldwell](https://discuss.elastic.co/u/Aaron_Caldwell)\
**Post date:** [October 9, 2019, 11:14pm UTC](https://discuss.elastic.co/t/how-to-get-documents-more-than-10000-in-elasticsearch-for-visualization/202845/3 "2019-10-09T23:14:04Z")

</div>

Hello,

I'll echo what CJ said.

Technically you can bump this limit on the Elasticsearch side by adjusting the `index.max_result_window`. Just be aware there may be an associated performance cost.. That would really be the only option for increasing the number of documents returned to a Kibana visualization.

Outside of Kibana, as you said, the Scroll API is your best best for exceeding this limit.

Regards,  
Aaron

---

<div class="post-metadata">

**Author:** ![Nirajan](https://avatars.discourse-cdn.com/v4/letter/n/6bbea6/32.png) [@Nirajan](https://discuss.elastic.co/u/Nirajan)\
**Post date:** [October 10, 2019, 9:00am UTC](https://discuss.elastic.co/t/how-to-get-documents-more-than-10000-in-elasticsearch-for-visualization/202845/4 "2019-10-10T09:00:34Z")

</div>

Hello Guys,

Thanks a lot for your suggestions.

I tried it and it works. 🙂

Have a good time.

Best Regards,

Nirajan

---

<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 7, 2019, 9:00am UTC](https://discuss.elastic.co/t/how-to-get-documents-more-than-10000-in-elasticsearch-for-visualization/202845/5 "2019-11-07T09:00:40Z")

</div>

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