How to retrieve more than 10,000 results


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

(David Pilato) #2

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.


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?


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)

(David Pilato) #5

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.


What do u think of "max_result_window" ? Can we set that to a million ?

(David Pilato) #7

I think it's a bad idea.

(system) #8

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