【发布时间】:2017-08-19 16:07:56
【问题描述】:
我一直在尝试在弹性搜索术语聚合中添加分页。在查询中,我们可以添加分页,例如,
{
"from": 0, // to add the start to control the pagination
"size": 10,
"query": { }
}
这很清楚,但是当我想给聚合添加分页时,我阅读了很多关于它的内容,但我找不到任何东西,我的代码看起来像这样,
{
"from": 0,
"size": 0,
"aggs": {
"group_by_name": {
"terms": {
"field": "name",
"size": 20
},
"aggs": {
"top_tag_hits": {
"top_hits": {
"size": 1
}
}
}
}
}
}
有什么方法可以使用函数或任何其他建议来创建分页吗?
【问题讨论】:
标签: elasticsearch pagination elasticsearch-plugin