{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch-dsl-py/issues/1036","repository_url":"https://api.github.com/repos/elastic/elasticsearch-dsl-py","labels_url":"https://api.github.com/repos/elastic/elasticsearch-dsl-py/issues/1036/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch-dsl-py/issues/1036/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch-dsl-py/issues/1036/events","html_url":"https://github.com/elastic/elasticsearch-dsl-py/issues/1036","id":371040648,"node_id":"MDU6SXNzdWUzNzEwNDA2NDg=","number":1036,"title":"'buckets' key error, when nested aggregation","user":{"login":"BolshakovNO","id":8124213,"node_id":"MDQ6VXNlcjgxMjQyMTM=","avatar_url":"https://avatars0.githubusercontent.com/u/8124213?v=4","gravatar_id":"","url":"https://api.github.com/users/BolshakovNO","html_url":"https://github.com/BolshakovNO","followers_url":"https://api.github.com/users/BolshakovNO/followers","following_url":"https://api.github.com/users/BolshakovNO/following{/other_user}","gists_url":"https://api.github.com/users/BolshakovNO/gists{/gist_id}","starred_url":"https://api.github.com/users/BolshakovNO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BolshakovNO/subscriptions","organizations_url":"https://api.github.com/users/BolshakovNO/orgs","repos_url":"https://api.github.com/users/BolshakovNO/repos","events_url":"https://api.github.com/users/BolshakovNO/events{/privacy}","received_events_url":"https://api.github.com/users/BolshakovNO/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-10-17T12:09:45Z","updated_at":"2018-11-15T14:54:43Z","closed_at":null,"author_association":"NONE","body":"```\r\nelasticsearch_dsl/response/aggs.py, line 43, in buckets\r\n    bs = self._d_['buckets']\r\n\r\nbuckets = {'doc_count': 100, 'nested': {'doc_count_error_upper_bound':...}\r\nsearch.agg = {  \r\n   'timerange.start':{  \r\n      'nested':{  \r\n         'path':'TIMERANGE'\r\n      },\r\n      'aggs':{  \r\n         'nested':{  \r\n            'terms':{  \r\n               'field':'TIMERANGE.START',\r\n               'order':{  \r\n                  '_key':'desc'\r\n               },\r\n               'size':5\r\n            },\r\n            'aggs':{  \r\n               'priority':{  \r\n                  'reverse_nested':{  \r\n\r\n                  },\r\n                  'aggs':{  \r\n                     'reverse_nested':{  \r\n                        'terms':{  \r\n                           'field':'PRIORITY',\r\n                           'size':5\r\n                        }\r\n                     }\r\n                  }\r\n               }\r\n            }\r\n         }\r\n      }\r\n   }\r\n}\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch-dsl-py/issues/comments/439067504","html_url":"https://github.com/elastic/elasticsearch-dsl-py/issues/1036#issuecomment-439067504","issue_url":"https://api.github.com/repos/elastic/elasticsearch-dsl-py/issues/1036","id":439067504,"node_id":"MDEyOklzc3VlQ29tbWVudDQzOTA2NzUwNA==","user":{"login":"HonzaKral","id":32132,"node_id":"MDQ6VXNlcjMyMTMy","avatar_url":"https://avatars0.githubusercontent.com/u/32132?v=4","gravatar_id":"","url":"https://api.github.com/users/HonzaKral","html_url":"https://github.com/HonzaKral","followers_url":"https://api.github.com/users/HonzaKral/followers","following_url":"https://api.github.com/users/HonzaKral/following{/other_user}","gists_url":"https://api.github.com/users/HonzaKral/gists{/gist_id}","starred_url":"https://api.github.com/users/HonzaKral/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HonzaKral/subscriptions","organizations_url":"https://api.github.com/users/HonzaKral/orgs","repos_url":"https://api.github.com/users/HonzaKral/repos","events_url":"https://api.github.com/users/HonzaKral/events{/privacy}","received_events_url":"https://api.github.com/users/HonzaKral/received_events","type":"User","site_admin":false},"created_at":"2018-11-15T14:54:43Z","updated_at":"2018-11-15T14:54:43Z","author_association":"MEMBER","body":"I am sorry, but `search.aggregations.buckets` is not supposed to work as you need to access an aggregation by its name (`timerange.start` in your case) and only *then* access `.buckets` on that aggregation. Since you have a dot in the aggregation name it will not work in this case. Please use a name without a dot and try accessing it via `.aggregations.NAME.buckets`.\r\n\r\nI am sorry if I am still not getting your issue right but without code to reproduce it I am not 100% sure what is happening."}}
{"actor":{"display_login":"HonzaKral"}}