{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/30460","repository_url":"https://api.github.com/repos/elastic/elasticsearch","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/30460/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/30460/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/30460/events","html_url":"https://github.com/elastic/elasticsearch/pull/30460","id":321200740,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg2NjQ1MTQw","number":30460,"title":"Percentile/Ranks should return null instead of NaN when empty","user":{"login":"polyfractal","id":1224228,"node_id":"MDQ6VXNlcjEyMjQyMjg=","avatar_url":"https://avatars1.githubusercontent.com/u/1224228?v=4","gravatar_id":"","url":"https://api.github.com/users/polyfractal","html_url":"https://github.com/polyfractal","followers_url":"https://api.github.com/users/polyfractal/followers","following_url":"https://api.github.com/users/polyfractal/following{/other_user}","gists_url":"https://api.github.com/users/polyfractal/gists{/gist_id}","starred_url":"https://api.github.com/users/polyfractal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/polyfractal/subscriptions","organizations_url":"https://api.github.com/users/polyfractal/orgs","repos_url":"https://api.github.com/users/polyfractal/repos","events_url":"https://api.github.com/users/polyfractal/events{/privacy}","received_events_url":"https://api.github.com/users/polyfractal/received_events","type":"User","site_admin":false},"labels":[{"id":141141324,"node_id":"MDU6TGFiZWwxNDExNDEzMjQ=","url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Search/Aggregations","name":":Search/Aggregations","color":"0e8a16","default":false},{"id":33660,"node_id":"MDU6TGFiZWwzMzY2MA==","url":"https://api.github.com/repos/elastic/elasticsearch/labels/%3Ebreaking","name":">breaking","color":"d93f0b","default":false},{"id":23173,"node_id":"MDU6TGFiZWwyMzE3Mw==","url":"https://api.github.com/repos/elastic/elasticsearch/labels/%3Ebug","name":">bug","color":"b60205","default":false},{"id":94283388,"node_id":"MDU6TGFiZWw5NDI4MzM4OA==","url":"https://api.github.com/repos/elastic/elasticsearch/labels/review","name":"review","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":{"login":"cbuescher","id":10398885,"node_id":"MDQ6VXNlcjEwMzk4ODg1","avatar_url":"https://avatars0.githubusercontent.com/u/10398885?v=4","gravatar_id":"","url":"https://api.github.com/users/cbuescher","html_url":"https://github.com/cbuescher","followers_url":"https://api.github.com/users/cbuescher/followers","following_url":"https://api.github.com/users/cbuescher/following{/other_user}","gists_url":"https://api.github.com/users/cbuescher/gists{/gist_id}","starred_url":"https://api.github.com/users/cbuescher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbuescher/subscriptions","organizations_url":"https://api.github.com/users/cbuescher/orgs","repos_url":"https://api.github.com/users/cbuescher/repos","events_url":"https://api.github.com/users/cbuescher/events{/privacy}","received_events_url":"https://api.github.com/users/cbuescher/received_events","type":"User","site_admin":false},"assignees":[{"login":"cbuescher","id":10398885,"node_id":"MDQ6VXNlcjEwMzk4ODg1","avatar_url":"https://avatars0.githubusercontent.com/u/10398885?v=4","gravatar_id":"","url":"https://api.github.com/users/cbuescher","html_url":"https://github.com/cbuescher","followers_url":"https://api.github.com/users/cbuescher/followers","following_url":"https://api.github.com/users/cbuescher/following{/other_user}","gists_url":"https://api.github.com/users/cbuescher/gists{/gist_id}","starred_url":"https://api.github.com/users/cbuescher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbuescher/subscriptions","organizations_url":"https://api.github.com/users/cbuescher/orgs","repos_url":"https://api.github.com/users/cbuescher/repos","events_url":"https://api.github.com/users/cbuescher/events{/privacy}","received_events_url":"https://api.github.com/users/cbuescher/received_events","type":"User","site_admin":false}],"milestone":null,"comments":10,"created_at":"2018-05-08T14:04:14Z","updated_at":"2018-06-07T20:37:14Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/30460","html_url":"https://github.com/elastic/elasticsearch/pull/30460","diff_url":"https://github.com/elastic/elasticsearch/pull/30460.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/30460.patch"},"body":"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.  \r\n\r\nNote: 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.\r\n\r\nI looked through all the other metric aggs and they appear to return null (or 0.0, in the case of cardinality/value_count/sum).  So percentiles were the only outliers.\r\n\r\nThis is sorta a bwc break, but could also be seen as a bugfix.  I'm not sure what we want to do with regards to backporting.\r\n\r\nCloses #29066\r\n"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/395556589","html_url":"https://github.com/elastic/elasticsearch/pull/30460#issuecomment-395556589","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/30460","id":395556589,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTU1NjU4OQ==","user":{"login":"cbuescher","id":10398885,"node_id":"MDQ6VXNlcjEwMzk4ODg1","avatar_url":"https://avatars0.githubusercontent.com/u/10398885?v=4","gravatar_id":"","url":"https://api.github.com/users/cbuescher","html_url":"https://github.com/cbuescher","followers_url":"https://api.github.com/users/cbuescher/followers","following_url":"https://api.github.com/users/cbuescher/following{/other_user}","gists_url":"https://api.github.com/users/cbuescher/gists{/gist_id}","starred_url":"https://api.github.com/users/cbuescher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbuescher/subscriptions","organizations_url":"https://api.github.com/users/cbuescher/orgs","repos_url":"https://api.github.com/users/cbuescher/repos","events_url":"https://api.github.com/users/cbuescher/events{/privacy}","received_events_url":"https://api.github.com/users/cbuescher/received_events","type":"User","site_admin":false},"created_at":"2018-06-07T20:37:14Z","updated_at":"2018-06-07T20:37:14Z","author_association":"MEMBER","body":"@polyfractal does it look the same as the one mentioned above? What I find strange it that is doesn't reproduce in that case. That probably needs some investigation too."}}
{"actor":{"display_login":"cbuescher"}}