# How to retrieve more than 10,000 results

**URL:** https://discuss.elastic.co/t/how-to-retrieve-more-than-10-000-results/140594
**Category:** Elasticsearch
**Created:** [July 18, 2018, 5:25pm UTC](https://discuss.elastic.co/t/how-to-retrieve-more-than-10-000-results/140594 "2018-07-18T17:25:04Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![snigdharao](https://avatars.discourse-cdn.com/v4/letter/s/4af34b/32.png) [@snigdharao](https://discuss.elastic.co/u/snigdharao)
#### Post date: [July 18, 2018, 5:25pm UTC](https://discuss.elastic.co/t/how-to-retrieve-more-than-10-000-results/140594/1 "2018-07-18T17:25:04Z")

</div>

I have an use case where i display 10 results on each page and there would be an api call when ever i go to further pages .  
Currently in solr there is start functionality which returns 10 results by default .  
But in elastic search i have issue when my from parameter includes 10000, I have seen that we can use scroll api , But i am not able to include from parameter while using scroll api?  
Is there any alternative for 'from' in scroll api

---

<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: [July 18, 2018, 7:21pm UTC](https://discuss.elastic.co/t/how-to-retrieve-more-than-10-000-results/140594/2 "2018-07-18T19:21:30Z")

</div>

Using `from` does not make sense in the scroll API as will always just ask for the next x results (`size`) until you reach the end.  
You just move forward basically.

---

<div class="post-metadata">

### Author: ![snigdharao](https://avatars.discourse-cdn.com/v4/letter/s/4af34b/32.png) [@snigdharao](https://discuss.elastic.co/u/snigdharao)
#### Post date: [July 18, 2018, 8:33pm UTC](https://discuss.elastic.co/t/how-to-retrieve-more-than-10-000-results/140594/3 "2018-07-18T20:33:47Z")

</div>

Is there a way to implement pagination concept in elastic without using scroll api?  
I need to get more than 10,000 results , How do i avoid this limitation?

---

<div class="post-metadata">

### Author: ![snigdharao](https://avatars.discourse-cdn.com/v4/letter/s/4af34b/32.png) [@snigdharao](https://discuss.elastic.co/u/snigdharao)
#### Post date: [July 18, 2018, 8:44pm UTC](https://discuss.elastic.co/t/how-to-retrieve-more-than-10-000-results/140594/4 "2018-07-18T20:44:04Z")

</div>

If i want 10 results on each page and there are total of 1 million data.whats the best way to do?I cant use scroll api in this scenario because I just want 10 results each time depending on my pagenumber and sizze(relatively i mean pagination)

---

<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: [July 18, 2018, 8:58pm UTC](https://discuss.elastic.co/t/how-to-retrieve-more-than-10-000-results/140594/5 "2018-07-18T20:58:17Z")

</div>

First of all, I don't think a user should go to page 999990 to get a meaningful result. I'd expect having the most relevant information on the top of the first page.

I never go to page 3 or 4 on Google...

Anyway, if you need deep pagination, have a look at `search_after` feature.

---

<div class="post-metadata">

### Author: ![snigdharao](https://avatars.discourse-cdn.com/v4/letter/s/4af34b/32.png) [@snigdharao](https://discuss.elastic.co/u/snigdharao)
#### Post date: [July 18, 2018, 9:30pm UTC](https://discuss.elastic.co/t/how-to-retrieve-more-than-10-000-results/140594/6 "2018-07-18T21:30:28Z")

</div>

What do u think of "max\_result\_window" ? Can we set that to a million ?

---

<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: [July 19, 2018, 7:24am UTC](https://discuss.elastic.co/t/how-to-retrieve-more-than-10-000-results/140594/7 "2018-07-19T07:24:31Z")

</div>

I think it's a bad idea.

---

<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: [August 16, 2018, 7:24am UTC](https://discuss.elastic.co/t/how-to-retrieve-more-than-10-000-results/140594/8 "2018-08-16T07:24:44Z")

</div>

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