How to control the elasticsearch aggregation results with From / Size?

若如初见. 提交于 2019-11-28 02:25:18

Seems like you probably want partitions. From the docs:

Sometimes there are too many unique terms to process in a single request/response pair so it can be useful to break the analysis up into multiple requests. This can be achieved by grouping the field’s values into a number of partitions at query-time and processing only one partition in each request.

Basically you add "include": { "partition": n, "num_partitions": x },, where n is the page and x is the number of pages.

Unfortunately this feature was added fairly recently. If the tags can be believed on the GitHub Issue which spawned this feature, you'll need to be on at least Elasticsearch 5.2 or better.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!