filter 적용 후 aggregation 하기
GET summary-20210705/_search
{
"size": 0,
"query": {
"bool": {
"filter": [
{
"range": {
...
}
},
{
"term": {
...
}
}
]
}
},
"aggs": {
"normalExactTop1MatchAvg": {
"avg": {
"field": "normal.exactTop1Match"
}
},
"normalRecall3at10Avg": {
"avg": {
"field": "normal.recall3at10"
}
}
}
}
전체 데이터를 single bucket 으로 보고 aggregation 하기
https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-global-aggregation.html
GET my-index/_search
{
"size": 0,
"aggs": {
"all": {
"global": {},
"aggs": {
...
}
}
}
}