I am trying to add pagination in elasticsearch term aggregation. In the request, we can add pagination as
{ "from": 0,
This is pretty clear, but when I want to add pagination to aggregation, I read a lot about it, but haven't found anything, my code looks like this:
{ "from": 0, "size": 0, "aggs": { "group_by_name": { "terms": { "field": "name", "size": 20 }, "aggs": { "top_tag_hits": { "top_hits": { "size": 1 } } } } } }
Is there a way to create pagination using a function or any other suggestions?
source share