# How to get all results from Elastic Search Index using Powershell and save them locally

**URL:** <https://discuss.elastic.co/t/how-to-get-all-results-from-elastic-search-index-using-powershell-and-save-them-locally/237332>\
**Category:** Elasticsearch\
**Created:** [June 16, 2020, 3:38pm UTC](https://discuss.elastic.co/t/how-to-get-all-results-from-elastic-search-index-using-powershell-and-save-them-locally/237332 "2020-06-16T15:38:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vikas10](https://avatars.discourse-cdn.com/v4/letter/v/9d8465/32.png) [@Vikas10](https://discuss.elastic.co/u/Vikas10)\
**Post date:** [June 16, 2020, 3:38pm UTC](https://discuss.elastic.co/t/how-to-get-all-results-from-elastic-search-index-using-powershell-and-save-them-locally/237332/1 "2020-06-16T15:38:40Z")

</div>

At present I'm getting only 10 results form content .but the total shows 12000..i want to get all 12000 results one time. Is there a way to do it?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 16, 2020, 5:00pm UTC](https://discuss.elastic.co/t/how-to-get-all-results-from-elastic-search-index-using-powershell-and-save-them-locally/237332/2 "2020-06-16T17:00:52Z")

</div>

Welcome!

You can use:

- the [`size` and `from` parameters](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-from-size.html) to display by default up to 10000 records to your users. If you want to change this limit, you can change `index.max_result_window` setting but be aware of the consequences (ie memory).
- the [search after](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-search-after.html) feature to do deep pagination.
- the [Scroll API](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html) if you want to extract a resultset to be consumed by another tool later.

---

<div class="post-metadata">

**Author:** ![Vikas10](https://avatars.discourse-cdn.com/v4/letter/v/9d8465/32.png) [@Vikas10](https://discuss.elastic.co/u/Vikas10)\
**Post date:** [June 16, 2020, 5:04pm UTC](https://discuss.elastic.co/t/how-to-get-all-results-from-elastic-search-index-using-powershell-and-save-them-locally/237332/3 "2020-06-16T17:04:42Z")

</div>

I did increase the index max\_Result\_window to 1000000 but no luck

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 16, 2020, 11:25pm UTC](https://discuss.elastic.co/t/how-to-get-all-results-from-elastic-search-index-using-powershell-and-save-them-locally/237332/4 "2020-06-16T23:25:13Z")

</div>

WDYM by no luck? Did you increase the size as well? What is the exact query you are running?

---

<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 14, 2020, 11:25pm UTC](https://discuss.elastic.co/t/how-to-get-all-results-from-elastic-search-index-using-powershell-and-save-them-locally/237332/5 "2020-07-14T23:25:15Z")

</div>

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