# Display the last 100k documents

**URL:** https://discuss.elastic.co/t/display-the-last-100k-documents/349961
**Category:** Elasticsearch
**Created:** [December 26, 2023, 1:30pm UTC](https://discuss.elastic.co/t/display-the-last-100k-documents/349961 "2023-12-26T13:30:40Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![1337](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/1337/32/125537_2.png) [@1337](https://discuss.elastic.co/u/1337)
#### Post date: [December 26, 2023, 1:30pm UTC](https://discuss.elastic.co/t/display-the-last-100k-documents/349961/1 "2023-12-26T13:30:40Z")

</div>

I want to display the last 100k documents for all indices. Each index with the last 100k

---

<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: [December 26, 2023, 2:54pm UTC](https://discuss.elastic.co/t/display-the-last-100k-documents/349961/2 "2023-12-26T14:54:37Z")

</div>

Do you want to **display** or **extract**? I don't see much value of displaying 100k docs to a human to be honest. But tell more about your use case.

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/paginate-search-results.html#search-after) feature to do deep pagination.
- the [Scroll API](https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html#scroll-search-results) if you want to extract a resultset to be consumed by another tool later. (Not recommended anymore)

---

<div class="post-metadata">

### Author: ![1337](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/1337/32/125537_2.png) [@1337](https://discuss.elastic.co/u/1337)
#### Post date: [December 26, 2023, 3:34pm UTC](https://discuss.elastic.co/t/display-the-last-100k-documents/349961/3 "2023-12-26T15:34:16Z")

</div>

I found want i mean using Bulk API sorry for the explanation above, when i process the document it take all the memory usage so using bulk api well solve this issue. Do you have any other suggestions? Thanks.

---

<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: [December 26, 2023, 3:58pm UTC](https://discuss.elastic.co/t/display-the-last-100k-documents/349961/4 "2023-12-26T15:58:24Z")

</div>

Is it the same question as [How can I search for the latest data entered in the indexes?](https://discuss.elastic.co/t/how-can-i-search-for-the-latest-data-entered-in-the-indexes/349972)?

---

<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: [January 23, 2024, 3:59pm UTC](https://discuss.elastic.co/t/display-the-last-100k-documents/349961/5 "2024-01-23T15:59:22Z")

</div>

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