gpt4 book ai didi

elasticsearch - 如何在 Elasticsearch 聚合中使用分页(大小和来源)?

转载 作者:行者123 更新时间:2023-12-02 22:15:23 26 4
gpt4 key购买 nike

如何在 elasticsearch 聚合中使用分页(大小和从),我在聚合中使用了大小和从,s 为 exmaple 抛出异常。
我想查询吗?

获取/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"
}
}
}
}
}
}

最佳答案

截至目前,不支持此功能。

这里有一个错误,但仍处于讨论模式。

问题 - https://github.com/elasticsearch/elasticsearch/issues/4915

关于elasticsearch - 如何在 Elasticsearch 聚合中使用分页(大小和来源)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28456319/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com