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
Elasticsearch version (bin/elasticsearch --version):
Version 6.2.2
Description of the problem including expected versus actual behavior:
Different metric aggregations are returning different values when none of the documents in the bucket contain the field used in the aggregation. avg, min and max for example return null, whereas the percentiles agg returns NaN. I would expect the return values to be consistent across aggregations, whether it be null or NaN.
Ran the following aggregations, where some buckets contained docs without the test.sslTime field.
The other metric aggregations (min/max/etc) return `null` as their XContent value and string when nothing was computed (due to empty/missing fields). Percentiles and Percentile Ranks, however, return `NaN `which is inconsistent and confusing for the user. This fixes the inconsistency by making the aggs return `null`. This applies to both the numeric value and the "as string" value.
Note: like the metric aggs, this does not change the value if fetched directly from the percentiles object, which will return as `NaN`/`"NaN"`. This only changes the XContent output.
While this is a bugfix, it still breaks bwc in a minor way as the response changes from prior version.
Closes#29066
Elasticsearch version (
bin/elasticsearch --version
):Version 6.2.2
Description of the problem including expected versus actual behavior:
Different metric aggregations are returning different values when none of the documents in the bucket contain the field used in the aggregation.
avg
,min
andmax
for example returnnull
, whereas thepercentiles
agg returnsNaN
. I would expect the return values to be consistent across aggregations, whether it benull
orNaN
.Ran the following aggregations, where some buckets contained docs without the
test.sslTime
field.avg agg:
Percentiles agg, to obtain the median:
WIth example of the responses:
From the avg agg:
and from the percentiles agg:
The text was updated successfully, but these errors were encountered: