epi*_*pko 5 aggregation elasticsearch
我正在运行aggs查询并指定大小为100,但ES只返回10个桶.为什么?我错过了什么?
{
"size": 100
,"query": {
"bool": {
"must": [
{ "term": {"app": "cnn"} }
]
}
}
,"aggs": {
"unique_client": {
"terms": {"field": "client"}
}
}
}
Run Code Online (Sandbox Code Playgroud)
将top size参数设置为零以表示它是聚合.返回的桶数通过指定术语聚合括号中的大小来设置.
{
"size": 0
,"query": {
"bool": {
"must": [
{ "term": {"app": "cnn"} }
]
}
}
,"aggs": {
"unique_client": {
"terms": {
"field": "client",
"size" : 100
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
如果将其设置为0,则该值将默认为Integer.MAX_VALUE
| 归档时间: |
|
| 查看次数: |
4024 次 |
| 最近记录: |