Elastic search aggregation pagination issue

泄露秘密 提交于 2019-12-12 03:32:28

问题


How do i perform a query similar to this one in elasticsearch?

SELECT field FROM table GROUP BY field OFFSET 10 LIMIT 10;

Thank for the answer


回答1:


The short answer is that you can't (yet).

There's an open issue titled "Paging aggregation support" that should take care of this feature soon. As you can see that issue is two years old, still open and got many +1 from many people. It's still not slated for any releases yet, though.

In the meantime, you can retrieve your aggregation with size: 20 and then on the client side only consider the last 10 terms.



来源:https://stackoverflow.com/questions/35945769/elastic-search-aggregation-pagination-issue

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