Closed
Description
The missing value is not considered in min/max aggreagtions in es7 as they were in previous versions and I don't see this documented as a breaking change. I believe this is due optimization of using segment min/max values.
To reproduce run the following against es6 and es7. The missing values should be returned as the min and max value of the aggregation.
curl -XPUT -H"Content-Type: application/json" 'localhost:9200/testmissing/_doc/1' -d '{"title": "with value", "value": 1}'
curl -XPUT -H"Content-Type: application/json" 'localhost:9200/testmissing/_doc/2?refresh' -d '{"title": "missing value"}'
curl -XPOST -H"Content-Type: application/json" 'localhost:9200/testmissing/_search?pretty' -d '{
"size": 0,
"aggs": {
"min_missing": {
"min": {
"field": "value",
"missing": -1
}
},
"max_missinng": {
"max": {
"field": "value",
"missing": 2
}
}
}
}'