弹性搜索聚合分页问题 [英] Elastic search aggregation pagination issue

查看:146
本文介绍了弹性搜索聚合分页问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在弹性搜索中执行与此类似的查询?

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

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

感谢答案

推荐答案

简短的答案是你不能(还)。

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

有一个开放的题目是分页聚合支持,应尽快处理此功能。正如你可以看到这个问题是两岁,仍然开放,许多人获得了许多+1。

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.

在此期间,您可以使用大小:20 然后在客户端只考虑最后10个条款。

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

这篇关于弹性搜索聚合分页问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆