Hello,
We are dealing with around 500k documents.
Should I use Deep Pagination or Scroll API to display the search results to the user in production ?
Can someone please suggest something ?
Thanks
Siddharth
Hello,
We are dealing with around 500k documents.
Should I use Deep Pagination or Scroll API to display the search results to the user in production ?
Can someone please suggest something ?
Thanks
Siddharth
Scroll is for administrative actions because it leaves a context behind on the server. Deep pagination is expensive because Elasticsearch must use O(depth)
memory and O(depth * ln(depth))
cpu to service the request.
500k isn't very many documents though. You could probably get away with deep pagination all the way down but you need to know what you are doing. I'd limit users to prevent pagination deeper than, say, 50k docs.
© 2020. All Rights Reserved - Elasticsearch
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.