{"action":"created","comment":{"url":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/comments/22590554","id":22590554,"diff_hunk":"@@ -34,52 +36,36 @@\n import org.elasticsearch.search.query.QueryPhaseExecutionException;\n \n import java.io.IOException;\n-import java.util.*;\n+import java.util.ArrayList;\n+import java.util.Arrays;\n+import java.util.EnumSet;\n+import java.util.HashMap;\n+import java.util.List;\n+import java.util.Map;\n \n public abstract class Aggregator extends BucketCollector implements Releasable {\n \n+    /**\n+     * Returns whether one of the parents is a {@link BucketsAggregator}.\n+     */\n+    public static boolean hasParentBucketsAggregator(Aggregator parent) {","path":"src/main/java/org/elasticsearch/search/aggregations/Aggregator.java","position":33,"original_position":33,"commit_id":"e66dd8a733929840cf8c42ea855d218287e6599e","original_commit_id":"e66dd8a733929840cf8c42ea855d218287e6599e","user":{"login":"uboness","id":211019,"avatar_url":"https://avatars.githubusercontent.com/u/211019?v=3","gravatar_id":"","url":"https://api.github.com/users/uboness","html_url":"https://github.com/uboness","followers_url":"https://api.github.com/users/uboness/followers","following_url":"https://api.github.com/users/uboness/following{/other_user}","gists_url":"https://api.github.com/users/uboness/gists{/gist_id}","starred_url":"https://api.github.com/users/uboness/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uboness/subscriptions","organizations_url":"https://api.github.com/users/uboness/orgs","repos_url":"https://api.github.com/users/uboness/repos","events_url":"https://api.github.com/users/uboness/events{/privacy}","received_events_url":"https://api.github.com/users/uboness/received_events","type":"User","site_admin":false},"body":":) indeed\r\n","created_at":"2015-01-07T15:10:50Z","updated_at":"2015-01-07T15:10:50Z","html_url":"https://github.com/elasticsearch/elasticsearch/pull/9097#discussion_r22590554","pull_request_url":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/9097","_links":{"self":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/comments/22590554"},"html":{"href":"https://github.com/elasticsearch/elasticsearch/pull/9097#discussion_r22590554"},"pull_request":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/9097"}}},"pull_request":{"url":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/9097","id":26681452,"html_url":"https://github.com/elasticsearch/elasticsearch/pull/9097","diff_url":"https://github.com/elasticsearch/elasticsearch/pull/9097.diff","patch_url":"https://github.com/elasticsearch/elasticsearch/pull/9097.patch","issue_url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/9097","number":9097,"state":"open","locked":false,"title":"Aggregations: simplifications.","user":{"login":"jpountz","id":299848,"avatar_url":"https://avatars.githubusercontent.com/u/299848?v=3","gravatar_id":"","url":"https://api.github.com/users/jpountz","html_url":"https://github.com/jpountz","followers_url":"https://api.github.com/users/jpountz/followers","following_url":"https://api.github.com/users/jpountz/following{/other_user}","gists_url":"https://api.github.com/users/jpountz/gists{/gist_id}","starred_url":"https://api.github.com/users/jpountz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpountz/subscriptions","organizations_url":"https://api.github.com/users/jpountz/orgs","repos_url":"https://api.github.com/users/jpountz/repos","events_url":"https://api.github.com/users/jpountz/events{/privacy}","received_events_url":"https://api.github.com/users/jpountz/received_events","type":"User","site_admin":false},"body":"BucketAggregationMode used to be part of the framework, now it's only an\r\nimplementation detail of the (significant) terms, histogram, geohash grid and\r\nscripted aggregators.\r\n\r\nAggregator.estimatedBucketCount() was a complicated way to do the initial sizing\r\nof the data structures, but it did not work very well in practice and was rather\r\nlikely to lead to over-sized data-structures causing OOMEs. It's removed now and\r\nall data-structures start with a size of 1 and grow exponentially.\r\n\r\nAggregator.preCollection() is now symetric with postCollection(): it exists on\r\nall aggregation objects where postCollection() also is and recursively calls its\r\nchildren.\r\n\r\nFixed other minor issues related to generics and exceptions.","created_at":"2014-12-30T11:06:48Z","updated_at":"2015-01-07T15:10:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4eb029e3167f9ae49273764545edeb10b28fc8b5","assignee":{"login":"jpountz","id":299848,"avatar_url":"https://avatars.githubusercontent.com/u/299848?v=3","gravatar_id":"","url":"https://api.github.com/users/jpountz","html_url":"https://github.com/jpountz","followers_url":"https://api.github.com/users/jpountz/followers","following_url":"https://api.github.com/users/jpountz/following{/other_user}","gists_url":"https://api.github.com/users/jpountz/gists{/gist_id}","starred_url":"https://api.github.com/users/jpountz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpountz/subscriptions","organizations_url":"https://api.github.com/users/jpountz/orgs","repos_url":"https://api.github.com/users/jpountz/repos","events_url":"https://api.github.com/users/jpountz/events{/privacy}","received_events_url":"https://api.github.com/users/jpountz/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/9097/commits","review_comments_url":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/9097/comments","review_comment_url":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/comments/{number}","comments_url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/9097/comments","statuses_url":"https://api.github.com/repos/elasticsearch/elasticsearch/statuses/e66dd8a733929840cf8c42ea855d218287e6599e","head":{"label":"jpountz:fix/aggs_simplification","ref":"fix/aggs_simplification","sha":"e66dd8a733929840cf8c42ea855d218287e6599e","user":{"login":"jpountz","id":299848,"avatar_url":"https://avatars.githubusercontent.com/u/299848?v=3","gravatar_id":"","url":"https://api.github.com/users/jpountz","html_url":"https://github.com/jpountz","followers_url":"https://api.github.com/users/jpountz/followers","following_url":"https://api.github.com/users/jpountz/following{/other_user}","gists_url":"https://api.github.com/users/jpountz/gists{/gist_id}","starred_url":"https://api.github.com/users/jpountz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpountz/subscriptions","organizations_url":"https://api.github.com/users/jpountz/orgs","repos_url":"https://api.github.com/users/jpountz/repos","events_url":"https://api.github.com/users/jpountz/events{/privacy}","received_events_url":"https://api.github.com/users/jpountz/received_events","type":"User","site_admin":false},"repo":{"id":9633891,"name":"elasticsearch","full_name":"jpountz/elasticsearch","owner":{"login":"jpountz","id":299848,"avatar_url":"https://avatars.githubusercontent.com/u/299848?v=3","gravatar_id":"","url":"https://api.github.com/users/jpountz","html_url":"https://github.com/jpountz","followers_url":"https://api.github.com/users/jpountz/followers","following_url":"https://api.github.com/users/jpountz/following{/other_user}","gists_url":"https://api.github.com/users/jpountz/gists{/gist_id}","starred_url":"https://api.github.com/users/jpountz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpountz/subscriptions","organizations_url":"https://api.github.com/users/jpountz/orgs","repos_url":"https://api.github.com/users/jpountz/repos","events_url":"https://api.github.com/users/jpountz/events{/privacy}","received_events_url":"https://api.github.com/users/jpountz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jpountz/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":true,"url":"https://api.github.com/repos/jpountz/elasticsearch","forks_url":"https://api.github.com/repos/jpountz/elasticsearch/forks","keys_url":"https://api.github.com/repos/jpountz/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jpountz/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jpountz/elasticsearch/teams","hooks_url":"https://api.github.com/repos/jpountz/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/jpountz/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/jpountz/elasticsearch/events","assignees_url":"https://api.github.com/repos/jpountz/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/jpountz/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/jpountz/elasticsearch/tags","blobs_url":"https://api.github.com/repos/jpountz/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jpountz/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jpountz/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/jpountz/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jpountz/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/jpountz/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/jpountz/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/jpountz/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/jpountz/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/jpountz/elasticsearch/subscription","commits_url":"https://api.github.com/repos/jpountz/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/jpountz/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/jpountz/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/jpountz/elasticsearch/issues/comments/{number}","contents_url":"https://api.github.com/repos/jpountz/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/jpountz/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jpountz/elasticsearch/merges","archive_url":"https://api.github.com/repos/jpountz/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jpountz/elasticsearch/downloads","issues_url":"https://api.github.com/repos/jpountz/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/jpountz/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/jpountz/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/jpountz/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jpountz/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/jpountz/elasticsearch/releases{/id}","created_at":"2013-04-23T21:37:49Z","updated_at":"2014-11-05T08:22:11Z","pushed_at":"2015-01-07T13:04:50Z","git_url":"git://github.com/jpountz/elasticsearch.git","ssh_url":"git@github.com:jpountz/elasticsearch.git","clone_url":"https://github.com/jpountz/elasticsearch.git","svn_url":"https://github.com/jpountz/elasticsearch","homepage":"http://elasticsearch.org","size":76872,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"elasticsearch:master","ref":"master","sha":"20f7be378b01b813421e84e605fcfbfe7f8c358c","user":{"login":"elasticsearch","id":141304,"avatar_url":"https://avatars.githubusercontent.com/u/141304?v=3","gravatar_id":"","url":"https://api.github.com/users/elasticsearch","html_url":"https://github.com/elasticsearch","followers_url":"https://api.github.com/users/elasticsearch/followers","following_url":"https://api.github.com/users/elasticsearch/following{/other_user}","gists_url":"https://api.github.com/users/elasticsearch/gists{/gist_id}","starred_url":"https://api.github.com/users/elasticsearch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elasticsearch/subscriptions","organizations_url":"https://api.github.com/users/elasticsearch/orgs","repos_url":"https://api.github.com/users/elasticsearch/repos","events_url":"https://api.github.com/users/elasticsearch/events{/privacy}","received_events_url":"https://api.github.com/users/elasticsearch/received_events","type":"Organization","site_admin":false},"repo":{"id":507775,"name":"elasticsearch","full_name":"elasticsearch/elasticsearch","owner":{"login":"elasticsearch","id":141304,"avatar_url":"https://avatars.githubusercontent.com/u/141304?v=3","gravatar_id":"","url":"https://api.github.com/users/elasticsearch","html_url":"https://github.com/elasticsearch","followers_url":"https://api.github.com/users/elasticsearch/followers","following_url":"https://api.github.com/users/elasticsearch/following{/other_user}","gists_url":"https://api.github.com/users/elasticsearch/gists{/gist_id}","starred_url":"https://api.github.com/users/elasticsearch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elasticsearch/subscriptions","organizations_url":"https://api.github.com/users/elasticsearch/orgs","repos_url":"https://api.github.com/users/elasticsearch/repos","events_url":"https://api.github.com/users/elasticsearch/events{/privacy}","received_events_url":"https://api.github.com/users/elasticsearch/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elasticsearch/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":false,"url":"https://api.github.com/repos/elasticsearch/elasticsearch","forks_url":"https://api.github.com/repos/elasticsearch/elasticsearch/forks","keys_url":"https://api.github.com/repos/elasticsearch/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elasticsearch/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elasticsearch/elasticsearch/teams","hooks_url":"https://api.github.com/repos/elasticsearch/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/elasticsearch/elasticsearch/events","assignees_url":"https://api.github.com/repos/elasticsearch/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/elasticsearch/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/elasticsearch/elasticsearch/tags","blobs_url":"https://api.github.com/repos/elasticsearch/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elasticsearch/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elasticsearch/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/elasticsearch/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elasticsearch/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/elasticsearch/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/elasticsearch/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/elasticsearch/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/elasticsearch/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/elasticsearch/elasticsearch/subscription","commits_url":"https://api.github.com/repos/elasticsearch/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/elasticsearch/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/elasticsearch/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/comments/{number}","contents_url":"https://api.github.com/repos/elasticsearch/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/elasticsearch/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elasticsearch/elasticsearch/merges","archive_url":"https://api.github.com/repos/elasticsearch/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elasticsearch/elasticsearch/downloads","issues_url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/elasticsearch/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/elasticsearch/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elasticsearch/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/elasticsearch/elasticsearch/releases{/id}","created_at":"2010-02-08T13:20:56Z","updated_at":"2015-01-07T14:20:02Z","pushed_at":"2015-01-07T13:18:41Z","git_url":"git://github.com/elasticsearch/elasticsearch.git","ssh_url":"git@github.com:elasticsearch/elasticsearch.git","clone_url":"https://github.com/elasticsearch/elasticsearch.git","svn_url":"https://github.com/elasticsearch/elasticsearch","homepage":"http://elasticsearch.org","size":256153,"stargazers_count":9490,"watchers_count":9490,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2907,"mirror_url":null,"open_issues_count":852,"forks":2907,"open_issues":852,"watchers":9490,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/9097"},"html":{"href":"https://github.com/elasticsearch/elasticsearch/pull/9097"},"issue":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/9097"},"comments":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/9097/comments"},"review_comments":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/9097/comments"},"review_comment":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/9097/commits"},"statuses":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/statuses/e66dd8a733929840cf8c42ea855d218287e6599e"}}}}