Home  >  Article  >  Backend Development  >  elasticsearch使用聚合分组后,分页怎么处理?

elasticsearch使用聚合分组后,分页怎么处理?

WBOY
WBOYOriginal
2016-06-06 20:23:035219browse

这两天在使用es,但由于是初学现在遇到了一个问题就是聚合后分页的问题。比如在mysql中,我们使用group by后可以使用limit形式去获取
分页的数据;但es中我好像找不到这种指定区间的从而实现分页。
不聚合的时候我知道指定from的size参数能分页。
请问有做过这方面的朋友指教下吗?

回复内容:

这两天在使用es,但由于是初学现在遇到了一个问题就是聚合后分页的问题。比如在mysql中,我们使用group by后可以使用limit形式去获取
分页的数据;但es中我好像找不到这种指定区间的从而实现分页。
不聚合的时候我知道指定from的size参数能分页。
请问有做过这方面的朋友指教下吗?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn