Elasticsearch

Scroll vs "search_after"

Both used process searches with large number of results

  • Scrolls require less code to use, but there is some small overhead to create a scroll context and the problem of "deep pagination" (if you use sorting)
  • Search_after is much more lightweight, doesn't have the deep pagination problem but requires extra code and application logic

Elasticsearch
0
Composite Aggregations

Serve two main purposes:

  • Allows for pagination of large results No need to define the "size" used in typical aggs, the composite aggregation will return an "after_key" that is used for pagination

  • Allow multiple aggregations to be run in one (hence the name "composite")

Elasticsearch
0