{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch-net/issues/1466","labels_url":"https://api.github.com/repos/elastic/elasticsearch-net/issues/1466/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch-net/issues/1466/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch-net/issues/1466/events","html_url":"https://github.com/elastic/elasticsearch-net/issues/1466","id":90595131,"number":1466,"title":"Global aggregation not working","user":{"login":"redserpent7","id":7194031,"avatar_url":"https://avatars.githubusercontent.com/u/7194031?v=3","gravatar_id":"","url":"https://api.github.com/users/redserpent7","html_url":"https://github.com/redserpent7","followers_url":"https://api.github.com/users/redserpent7/followers","following_url":"https://api.github.com/users/redserpent7/following{/other_user}","gists_url":"https://api.github.com/users/redserpent7/gists{/gist_id}","starred_url":"https://api.github.com/users/redserpent7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redserpent7/subscriptions","organizations_url":"https://api.github.com/users/redserpent7/orgs","repos_url":"https://api.github.com/users/redserpent7/repos","events_url":"https://api.github.com/users/redserpent7/events{/privacy}","received_events_url":"https://api.github.com/users/redserpent7/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-24T07:35:35Z","updated_at":"2015-06-24T14:32:14Z","closed_at":null,"body":"Hi,\r\n\r\nI am trying to follow the example provided in [the documentation](http://nest.azurewebsites.net/nest/aggregations/global.html) to create a global aggregate. However, ES keeps giving me this error: ``Parse Failure [Missing definition for aggregation [global_bucket]]];``\r\n\r\nAny idea why I am getting this, I copy/paste the code in the example as is, only changed the field name to match the name of the field in my index."},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch-net/issues/comments/114889003","html_url":"https://github.com/elastic/elasticsearch-net/issues/1466#issuecomment-114889003","issue_url":"https://api.github.com/repos/elastic/elasticsearch-net/issues/1466","id":114889003,"user":{"login":"gmarz","id":1594777,"avatar_url":"https://avatars.githubusercontent.com/u/1594777?v=3","gravatar_id":"","url":"https://api.github.com/users/gmarz","html_url":"https://github.com/gmarz","followers_url":"https://api.github.com/users/gmarz/followers","following_url":"https://api.github.com/users/gmarz/following{/other_user}","gists_url":"https://api.github.com/users/gmarz/gists{/gist_id}","starred_url":"https://api.github.com/users/gmarz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmarz/subscriptions","organizations_url":"https://api.github.com/users/gmarz/orgs","repos_url":"https://api.github.com/users/gmarz/repos","events_url":"https://api.github.com/users/gmarz/events{/privacy}","received_events_url":"https://api.github.com/users/gmarz/received_events","type":"User","site_admin":false},"created_at":"2015-06-24T14:32:14Z","updated_at":"2015-06-24T14:32:14Z","body":"Hey @redserpent7 this is an error in the docs, it should be:\r\n\r\n```csharp\r\nvar request = new SearchRequest\r\n{\r\n    Query = new QueryContainer(new MatchQuery\r\n    {\r\n        Field = \"country\",\r\n        Query = \"Malaysia\"\r\n    }\r\n    ),\r\n    Aggregations = new Dictionary<string, IAggregationContainer>\r\n    {\r\n        { \"global_bucket\", new AggregationContainer\r\n            {\r\n                Global = new GlobalAggregator(),\r\n                Aggregations = new Dictionary<string, IAggregationContainer>\r\n                {\r\n                    { \"bool_count\", new AggregationContainer\r\n                        {\r\n                            Terms = new TermsAggregator\r\n                            {\r\n                                Field = \"boolValue\"\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n};\r\n```\r\n\r\nWe'll correct this ASAP.  Thanks for reporting!"}}