{"action":"created","comment":{"url":"https://api.github.com/repos/GooruAdmin/insights-reports/pulls/comments/30111727","id":30111727,"diff_hunk":"@@ -772,6 +773,17 @@ private void includeBucketAggregation(TermsBuilder mainFilter,JSONObject jsonObj\n \t\t\t\tmainFilter.subAggregation(AggregationBuilders.count(aggregateName).field(fieldName));\n \t\t\t}else if(APIConstants.AggregateFields.DISTINCT.getField().equalsIgnoreCase(aggregateType)){\n \t\t\t\tmainFilter.subAggregation(AggregationBuilders.cardinality(aggregateName).field(fieldName));\n+\t\t\t}else if(APIConstants.AggregateFields.PERCENTILES.getField().equalsIgnoreCase(aggregateType)){\n+\t\t\t\tPercentilesBuilder percentilesBuilder = AggregationBuilders.percentiles(aggregateName).field(fieldName);\n+\t\t\t\tif(jsonObject.has(APIConstants.AggregateFields.PERCENTS.getField()) && !jsonObject.isNull(APIConstants.AggregateFields.PERCENTS.getField())) {\n+\t\t\t\t\tString[] percentsArray = jsonObject.get(APIConstants.AggregateFields.PERCENTS.getField()).toString().split(\",\");\n+\t\t\t\t\tdouble[] percents = new double[percentsArray.length];\n+\t\t\t\t\tfor(int index = 0; index < percentsArray.length; index ++) {\n+\t\t\t\t\t\tpercents[index] = Double.parseDouble(percentsArray[index]);","path":"src/main/java/org/gooru/insights/services/BaseESServiceImpl.java","position":null,"original_position":27,"commit_id":"797a5d249fd8c92a8a6a651d89cbc672ba0b014f","original_commit_id":"88d5b39203762a4e098a36534cf34d27f827768e","user":{"login":"RenukaGurumurthy","id":6572033,"avatar_url":"https://avatars.githubusercontent.com/u/6572033?v=3","gravatar_id":"","url":"https://api.github.com/users/RenukaGurumurthy","html_url":"https://github.com/RenukaGurumurthy","followers_url":"https://api.github.com/users/RenukaGurumurthy/followers","following_url":"https://api.github.com/users/RenukaGurumurthy/following{/other_user}","gists_url":"https://api.github.com/users/RenukaGurumurthy/gists{/gist_id}","starred_url":"https://api.github.com/users/RenukaGurumurthy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RenukaGurumurthy/subscriptions","organizations_url":"https://api.github.com/users/RenukaGurumurthy/orgs","repos_url":"https://api.github.com/users/RenukaGurumurthy/repos","events_url":"https://api.github.com/users/RenukaGurumurthy/events{/privacy}","received_events_url":"https://api.github.com/users/RenukaGurumurthy/received_events","type":"User","site_admin":false},"body":"This is required because, Percentiles method accepts only double values","created_at":"2015-05-12T07:56:28Z","updated_at":"2015-05-12T07:56:28Z","html_url":"https://github.com/GooruAdmin/insights-reports/pull/3#discussion_r30111727","pull_request_url":"https://api.github.com/repos/GooruAdmin/insights-reports/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/GooruAdmin/insights-reports/pulls/comments/30111727"},"html":{"href":"https://github.com/GooruAdmin/insights-reports/pull/3#discussion_r30111727"},"pull_request":{"href":"https://api.github.com/repos/GooruAdmin/insights-reports/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/GooruAdmin/insights-reports/pulls/3","id":35007108,"html_url":"https://github.com/GooruAdmin/insights-reports/pull/3","diff_url":"https://github.com/GooruAdmin/insights-reports/pull/3.diff","patch_url":"https://github.com/GooruAdmin/insights-reports/pull/3.patch","issue_url":"https://api.github.com/repos/GooruAdmin/insights-reports/issues/3","number":3,"state":"open","locked":false,"title":"Added percentiles aggregation support on group by","user":{"login":"RenukaGurumurthy","id":6572033,"avatar_url":"https://avatars.githubusercontent.com/u/6572033?v=3","gravatar_id":"","url":"https://api.github.com/users/RenukaGurumurthy","html_url":"https://github.com/RenukaGurumurthy","followers_url":"https://api.github.com/users/RenukaGurumurthy/followers","following_url":"https://api.github.com/users/RenukaGurumurthy/following{/other_user}","gists_url":"https://api.github.com/users/RenukaGurumurthy/gists{/gist_id}","starred_url":"https://api.github.com/users/RenukaGurumurthy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RenukaGurumurthy/subscriptions","organizations_url":"https://api.github.com/users/RenukaGurumurthy/orgs","repos_url":"https://api.github.com/users/RenukaGurumurthy/repos","events_url":"https://api.github.com/users/RenukaGurumurthy/events{/privacy}","received_events_url":"https://api.github.com/users/RenukaGurumurthy/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-08T13:10:20Z","updated_at":"2015-05-12T07:56:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"44df17efb2d2e6acb6617b7ff9646d5401edd30b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GooruAdmin/insights-reports/pulls/3/commits","review_comments_url":"https://api.github.com/repos/GooruAdmin/insights-reports/pulls/3/comments","review_comment_url":"https://api.github.com/repos/GooruAdmin/insights-reports/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GooruAdmin/insights-reports/issues/3/comments","statuses_url":"https://api.github.com/repos/GooruAdmin/insights-reports/statuses/797a5d249fd8c92a8a6a651d89cbc672ba0b014f","head":{"label":"RenukaGurumurthy:master","ref":"master","sha":"797a5d249fd8c92a8a6a651d89cbc672ba0b014f","user":{"login":"RenukaGurumurthy","id":6572033,"avatar_url":"https://avatars.githubusercontent.com/u/6572033?v=3","gravatar_id":"","url":"https://api.github.com/users/RenukaGurumurthy","html_url":"https://github.com/RenukaGurumurthy","followers_url":"https://api.github.com/users/RenukaGurumurthy/followers","following_url":"https://api.github.com/users/RenukaGurumurthy/following{/other_user}","gists_url":"https://api.github.com/users/RenukaGurumurthy/gists{/gist_id}","starred_url":"https://api.github.com/users/RenukaGurumurthy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RenukaGurumurthy/subscriptions","organizations_url":"https://api.github.com/users/RenukaGurumurthy/orgs","repos_url":"https://api.github.com/users/RenukaGurumurthy/repos","events_url":"https://api.github.com/users/RenukaGurumurthy/events{/privacy}","received_events_url":"https://api.github.com/users/RenukaGurumurthy/received_events","type":"User","site_admin":false},"repo":{"id":33871856,"name":"insights-reports","full_name":"RenukaGurumurthy/insights-reports","owner":{"login":"RenukaGurumurthy","id":6572033,"avatar_url":"https://avatars.githubusercontent.com/u/6572033?v=3","gravatar_id":"","url":"https://api.github.com/users/RenukaGurumurthy","html_url":"https://github.com/RenukaGurumurthy","followers_url":"https://api.github.com/users/RenukaGurumurthy/followers","following_url":"https://api.github.com/users/RenukaGurumurthy/following{/other_user}","gists_url":"https://api.github.com/users/RenukaGurumurthy/gists{/gist_id}","starred_url":"https://api.github.com/users/RenukaGurumurthy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RenukaGurumurthy/subscriptions","organizations_url":"https://api.github.com/users/RenukaGurumurthy/orgs","repos_url":"https://api.github.com/users/RenukaGurumurthy/repos","events_url":"https://api.github.com/users/RenukaGurumurthy/events{/privacy}","received_events_url":"https://api.github.com/users/RenukaGurumurthy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RenukaGurumurthy/insights-reports","description":"","fork":true,"url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports","forks_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/forks","keys_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/teams","hooks_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/hooks","issue_events_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/issues/events{/number}","events_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/events","assignees_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/assignees{/user}","branches_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/branches{/branch}","tags_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/tags","blobs_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/git/refs{/sha}","trees_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/statuses/{sha}","languages_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/languages","stargazers_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/stargazers","contributors_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/contributors","subscribers_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/subscribers","subscription_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/subscription","commits_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/commits{/sha}","git_commits_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/git/commits{/sha}","comments_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/comments{/number}","issue_comment_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/issues/comments{/number}","contents_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/contents/{+path}","compare_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/merges","archive_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/downloads","issues_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/issues{/number}","pulls_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/pulls{/number}","milestones_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/milestones{/number}","notifications_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/labels{/name}","releases_url":"https://api.github.com/repos/RenukaGurumurthy/insights-reports/releases{/id}","created_at":"2015-04-13T14:01:40Z","updated_at":"2015-05-08T12:59:54Z","pushed_at":"2015-05-12T07:18:38Z","git_url":"git://github.com/RenukaGurumurthy/insights-reports.git","ssh_url":"git@github.com:RenukaGurumurthy/insights-reports.git","clone_url":"https://github.com/RenukaGurumurthy/insights-reports.git","svn_url":"https://github.com/RenukaGurumurthy/insights-reports","homepage":"","size":18394,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GooruAdmin:master","ref":"master","sha":"1851d07aa770c3b8a5dfddc3acbbf081c8a31daa","user":{"login":"GooruAdmin","id":3199883,"avatar_url":"https://avatars.githubusercontent.com/u/3199883?v=3","gravatar_id":"","url":"https://api.github.com/users/GooruAdmin","html_url":"https://github.com/GooruAdmin","followers_url":"https://api.github.com/users/GooruAdmin/followers","following_url":"https://api.github.com/users/GooruAdmin/following{/other_user}","gists_url":"https://api.github.com/users/GooruAdmin/gists{/gist_id}","starred_url":"https://api.github.com/users/GooruAdmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GooruAdmin/subscriptions","organizations_url":"https://api.github.com/users/GooruAdmin/orgs","repos_url":"https://api.github.com/users/GooruAdmin/repos","events_url":"https://api.github.com/users/GooruAdmin/events{/privacy}","received_events_url":"https://api.github.com/users/GooruAdmin/received_events","type":"User","site_admin":false},"repo":{"id":33867104,"name":"insights-reports","full_name":"GooruAdmin/insights-reports","owner":{"login":"GooruAdmin","id":3199883,"avatar_url":"https://avatars.githubusercontent.com/u/3199883?v=3","gravatar_id":"","url":"https://api.github.com/users/GooruAdmin","html_url":"https://github.com/GooruAdmin","followers_url":"https://api.github.com/users/GooruAdmin/followers","following_url":"https://api.github.com/users/GooruAdmin/following{/other_user}","gists_url":"https://api.github.com/users/GooruAdmin/gists{/gist_id}","starred_url":"https://api.github.com/users/GooruAdmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GooruAdmin/subscriptions","organizations_url":"https://api.github.com/users/GooruAdmin/orgs","repos_url":"https://api.github.com/users/GooruAdmin/repos","events_url":"https://api.github.com/users/GooruAdmin/events{/privacy}","received_events_url":"https://api.github.com/users/GooruAdmin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/GooruAdmin/insights-reports","description":"","fork":false,"url":"https://api.github.com/repos/GooruAdmin/insights-reports","forks_url":"https://api.github.com/repos/GooruAdmin/insights-reports/forks","keys_url":"https://api.github.com/repos/GooruAdmin/insights-reports/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GooruAdmin/insights-reports/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GooruAdmin/insights-reports/teams","hooks_url":"https://api.github.com/repos/GooruAdmin/insights-reports/hooks","issue_events_url":"https://api.github.com/repos/GooruAdmin/insights-reports/issues/events{/number}","events_url":"https://api.github.com/repos/GooruAdmin/insights-reports/events","assignees_url":"https://api.github.com/repos/GooruAdmin/insights-reports/assignees{/user}","branches_url":"https://api.github.com/repos/GooruAdmin/insights-reports/branches{/branch}","tags_url":"https://api.github.com/repos/GooruAdmin/insights-reports/tags","blobs_url":"https://api.github.com/repos/GooruAdmin/insights-reports/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GooruAdmin/insights-reports/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GooruAdmin/insights-reports/git/refs{/sha}","trees_url":"https://api.github.com/repos/GooruAdmin/insights-reports/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GooruAdmin/insights-reports/statuses/{sha}","languages_url":"https://api.github.com/repos/GooruAdmin/insights-reports/languages","stargazers_url":"https://api.github.com/repos/GooruAdmin/insights-reports/stargazers","contributors_url":"https://api.github.com/repos/GooruAdmin/insights-reports/contributors","subscribers_url":"https://api.github.com/repos/GooruAdmin/insights-reports/subscribers","subscription_url":"https://api.github.com/repos/GooruAdmin/insights-reports/subscription","commits_url":"https://api.github.com/repos/GooruAdmin/insights-reports/commits{/sha}","git_commits_url":"https://api.github.com/repos/GooruAdmin/insights-reports/git/commits{/sha}","comments_url":"https://api.github.com/repos/GooruAdmin/insights-reports/comments{/number}","issue_comment_url":"https://api.github.com/repos/GooruAdmin/insights-reports/issues/comments{/number}","contents_url":"https://api.github.com/repos/GooruAdmin/insights-reports/contents/{+path}","compare_url":"https://api.github.com/repos/GooruAdmin/insights-reports/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GooruAdmin/insights-reports/merges","archive_url":"https://api.github.com/repos/GooruAdmin/insights-reports/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GooruAdmin/insights-reports/downloads","issues_url":"https://api.github.com/repos/GooruAdmin/insights-reports/issues{/number}","pulls_url":"https://api.github.com/repos/GooruAdmin/insights-reports/pulls{/number}","milestones_url":"https://api.github.com/repos/GooruAdmin/insights-reports/milestones{/number}","notifications_url":"https://api.github.com/repos/GooruAdmin/insights-reports/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GooruAdmin/insights-reports/labels{/name}","releases_url":"https://api.github.com/repos/GooruAdmin/insights-reports/releases{/id}","created_at":"2015-04-13T12:25:31Z","updated_at":"2015-05-08T09:16:04Z","pushed_at":"2015-05-12T07:18:39Z","git_url":"git://github.com/GooruAdmin/insights-reports.git","ssh_url":"git@github.com:GooruAdmin/insights-reports.git","clone_url":"https://github.com/GooruAdmin/insights-reports.git","svn_url":"https://github.com/GooruAdmin/insights-reports","homepage":"","size":18515,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":1,"forks":5,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GooruAdmin/insights-reports/pulls/3"},"html":{"href":"https://github.com/GooruAdmin/insights-reports/pull/3"},"issue":{"href":"https://api.github.com/repos/GooruAdmin/insights-reports/issues/3"},"comments":{"href":"https://api.github.com/repos/GooruAdmin/insights-reports/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/GooruAdmin/insights-reports/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/GooruAdmin/insights-reports/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GooruAdmin/insights-reports/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/GooruAdmin/insights-reports/statuses/797a5d249fd8c92a8a6a651d89cbc672ba0b014f"}}}}