Choosing Elasticsearch Pagination: from/size, search_after, or Scroll
Compare Elasticsearch pagination methods for deep ordered reads: from/size, search_after with Point in Time, and Scroll API.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Compare Elasticsearch pagination methods for deep ordered reads: from/size, search_after with Point in Time, and Scroll API.
When Elasticsearch rejects page requests beyond 10,000 documents, switch from from/size to search_after for stable deep pagination without raising index.max_result_window.
from/size breaks past index.max_result_window because it is an offset. Here is how search_after with a point-in-time cursor and a tiebreaker sort keeps deep paging stable.
Deep pagination with from/size in Elasticsearch hurts performance. Search‑After lets you page linearly by passing the last hit’s sort values as a cursor. Learn how to set it up, test it, and understand its limits.
Goal: Ensure continuous pagination using search_after when the primary sort field may contain duplicate values across documents, without encountering errors that halt scrolling. Constraint/uncertainty: Documentation states that the sort field must be unique per document; duplicates cause an error, but it is unclear whether Elasticsearch automatically incorpo