In our application, we have a listing of elasticsearch data, the data is rendered with pagination. Users can click on any page to get listing of that particular page.
After upgrade to 5.6, we are not able to get the result if the user clicks on a page greater than 10000.
As elasticsearch has mentioned the use of scroll API for deep pagination to get more record than 10000, but in my case scroll will not work as the user can randomly click on any page.
Can anyone suggest me how can I achieve deep pagination for users in the current version of elasticsearch. Thanks in advance.
Thanks for the reply, I tried increasing limit but it's slow down my cluster. Is there is any other way of getting these records?
We have a web application where we store users data in elasticsearch,
we have a listing page which shows all the records that the user has created with default pagination size of 100. he can increase pagination limit to 500 or 1000
So, if a user has created data more than 10000 which is quite usual in my case, the pages created will be greater than 100 (with pagination size of 100). To view, the previous record user can go to any page or can even click on the last page.
The user wouldn't click on page 1020 but can click on page 21 and if the page size is selected to 500, the elasticsearch will again throw an error.
So the page 20 is not less relevant is our case, suppose if a user searches for all the pin codes for a country and if a country has more than 10000 pin codes, then the listing page will contain more pages and user can manually visit any page.
I'm sure there is a user story. You need to help your user to find the right information for him.
For this you can use faceted navigation pattern, you can sort by whatever field but leaving your user scrolling over pages does look user friendly to me.
That said, it can happen that the user explicitly ask for this. In which case you will have to pay the price as I mentioned before.
Sure but whatever the technical implementation you will have to think about this.
On elasticsearch side, you can always ask for next page with search after feature. Or scroll if you want to export the result set to your application or to the user.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.