如何在弹性搜索聚合中使用分页(大小和从) [英] How to Use pagination (size and from) in elastic search aggregation?
本文介绍了如何在弹性搜索聚合中使用分页(大小和从)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在弹性搜索聚合中使用分页(大小和大小),我使用大小和从分隔,它会抛出例外的例外。
我想要查询吗?
How to Use pagination (size and from) in elasticsearch aggregation , I used Size and from in agreggition it,s throw exception for exmaple.
I wanna query like?
GET / index / nameorder / _search
GET /index/nameorder/_search
{
"size": 0,
"query": {
"filtered": {
"query": {
"bool": {
"must": [
{
"match": {
"projectId": "10057"
}
}
]
}
},
"filter": {
"range": {
"purchasedDate": {
"from": "2012-02-05T00:00:00",
"to": "2015-02-11T23:59:59"
}
}
}
}
},
"aggs": {
"group_by_a": {
"terms": {
"field": "promocode",
"size": 40,
"from": 40
},
"aggs": {
"TotalPrice": {
"sum": {
"field": "subtotalPrice"
}
}
}
}
}
}
推荐答案
截至目前,此功能不受支持。
As of now , this feature is not supported.
有一个错误,但是它仍然在讨论模式。
There is a bug on this , but its still in discuss mode.
问题 - https://github.com/elasticsearch/elasticsearch/issues/4915
这篇关于如何在弹性搜索聚合中使用分页(大小和从)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文