{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/kibana/issues/17362","repository_url":"https://api.github.com/repos/elastic/kibana","labels_url":"https://api.github.com/repos/elastic/kibana/issues/17362/labels{/name}","comments_url":"https://api.github.com/repos/elastic/kibana/issues/17362/comments","events_url":"https://api.github.com/repos/elastic/kibana/issues/17362/events","html_url":"https://github.com/elastic/kibana/issues/17362","id":308019290,"number":17362,"title":"Top Hit aggregation shows no result","user":{"login":"andilem","id":14012627,"avatar_url":"https://avatars2.githubusercontent.com/u/14012627?v=4","gravatar_id":"","url":"https://api.github.com/users/andilem","html_url":"https://github.com/andilem","followers_url":"https://api.github.com/users/andilem/followers","following_url":"https://api.github.com/users/andilem/following{/other_user}","gists_url":"https://api.github.com/users/andilem/gists{/gist_id}","starred_url":"https://api.github.com/users/andilem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andilem/subscriptions","organizations_url":"https://api.github.com/users/andilem/orgs","repos_url":"https://api.github.com/users/andilem/repos","events_url":"https://api.github.com/users/andilem/events{/privacy}","received_events_url":"https://api.github.com/users/andilem/received_events","type":"User","site_admin":false},"labels":[{"id":462161355,"url":"https://api.github.com/repos/elastic/kibana/labels/:Visualizations","name":":Visualizations","color":"fef2c0","default":false},{"id":575813365,"url":"https://api.github.com/repos/elastic/kibana/labels/non-issue","name":"non-issue","color":"cfcfcf","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-23T12:57:21Z","updated_at":"2018-03-23T16:07:40Z","closed_at":"2018-03-23T14:50:32Z","author_association":"NONE","body":"**Kibana version**: 6.2.3\r\n**Elasticsearch version**: 6.2.3\r\n\r\n**Description of the problem including expected versus actual behavior**:\r\nWhen creating a Metric with Top Hit aggregation and sorting on @timestamp, there is no result (\"-\") displayed. This seems to happen when the most recent indexed document doesn't contain the requested field (the field would be only available in older documents).\r\n\r\n**Steps to reproduce**:\r\n 1. Use Metricbeat (System is enough)\r\n 2. Create a Metric with Top Hit aggregation for system.uptime.duration.ms\r\n 3. The displayed value will be \"-\" in almost all cases (because there are nearly almost always newer documents from other system values not containing the requested field\r\n*Note*: when sorting on the actual field (system.uptime.duration.ms), there will be a result (but this is not the recent uptime ofc)."},"comment":{"url":"https://api.github.com/repos/elastic/kibana/issues/comments/375716176","html_url":"https://github.com/elastic/kibana/issues/17362#issuecomment-375716176","issue_url":"https://api.github.com/repos/elastic/kibana/issues/17362","id":375716176,"user":{"login":"andilem","id":14012627,"avatar_url":"https://avatars2.githubusercontent.com/u/14012627?v=4","gravatar_id":"","url":"https://api.github.com/users/andilem","html_url":"https://github.com/andilem","followers_url":"https://api.github.com/users/andilem/followers","following_url":"https://api.github.com/users/andilem/following{/other_user}","gists_url":"https://api.github.com/users/andilem/gists{/gist_id}","starred_url":"https://api.github.com/users/andilem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andilem/subscriptions","organizations_url":"https://api.github.com/users/andilem/orgs","repos_url":"https://api.github.com/users/andilem/repos","events_url":"https://api.github.com/users/andilem/events{/privacy}","received_events_url":"https://api.github.com/users/andilem/received_events","type":"User","site_admin":false},"created_at":"2018-03-23T16:07:40Z","updated_at":"2018-03-23T16:07:40Z","author_association":"NONE","body":"Thanks, it works the way you described. I'm very new to Kibana and didn't know that one can define a \"where exists\" filter on a visualization."}}
{"actor":{"display_login":"andilem"}}