You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When performing sum aggregation on a field which doesn't exist in all the documents or all documents have explicit null value for that field, the aggregation result shows 0, which is not as expected, null makes more sense. And you can see that, the avg/max/min aggregation returns null.
Request:
GET test1/_search
{
"size": 0,
"aggs": {
"stats-agg": {
"stats": {
"field": "a"
}
}
}
}
Describe the bug
When performing sum aggregation on a field which doesn't exist in all the documents or all documents have explicit null value for that field, the aggregation result shows
0
, which is not as expected,null
makes more sense. And you can see that, the avg/max/min aggregation returns null.Request:
result:
Related component
Search:Aggregations
To Reproduce
Expected behavior
Sum aggregation returns null rather than 0 for the case that all documents have null values for the field the aggregation performs on.
Additional Details
No response
The text was updated successfully, but these errors were encountered: