{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/63399510","id":63399510,"diff_hunk":"@@ -0,0 +1,150 @@\n+/*\n+ * Licensed to Elasticsearch under one or more contributor\n+ * license agreements. See the NOTICE file distributed with\n+ * this work for additional information regarding copyright\n+ * ownership. Elasticsearch licenses this file to you under\n+ * the Apache License, Version 2.0 (the \"License\"); you may\n+ * not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *    http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing,\n+ * software distributed under the License is distributed on an\n+ * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n+ * KIND, either express or implied.  See the License for the\n+ * specific language governing permissions and limitations\n+ * under the License.\n+ */\n+package org.elasticsearch.search.aggregations.matrix.stats;\n+\n+import org.apache.lucene.index.LeafReaderContext;\n+import org.elasticsearch.common.lease.Releasables;\n+import org.elasticsearch.common.util.BigArrays;\n+import org.elasticsearch.common.util.ObjectArray;\n+import org.elasticsearch.index.fielddata.SortedNumericDoubleValues;\n+import org.elasticsearch.search.aggregations.Aggregator;\n+import org.elasticsearch.search.aggregations.InternalAggregation;\n+import org.elasticsearch.search.aggregations.LeafBucketCollector;\n+import org.elasticsearch.search.aggregations.LeafBucketCollectorBase;\n+import org.elasticsearch.search.aggregations.metrics.MetricsAggregator;\n+import org.elasticsearch.search.aggregations.pipeline.PipelineAggregator;\n+import org.elasticsearch.search.aggregations.support.AggregationContext;\n+import org.elasticsearch.search.aggregations.support.ValuesSource;\n+\n+import java.io.IOException;\n+import java.util.ArrayList;\n+import java.util.HashMap;\n+import java.util.List;\n+import java.util.Map;\n+\n+/**\n+ * Metric Aggregation for computing the pearson product correlation coefficient between multiple fields\n+ **/\n+public class MatrixStatsAggregator extends MetricsAggregator {\n+    /** Multiple ValuesSource with field names */\n+    final Map<String, ValuesSource.Numeric> valuesSources;\n+\n+    /** array of descriptive stats, per shard, needed to compute the correlation */\n+    ObjectArray<RunningStats> stats;\n+\n+    public MatrixStatsAggregator(String name, Map<String, ValuesSource.Numeric> valuesSources, AggregationContext context,\n+                                 Aggregator parent, List<PipelineAggregator> pipelineAggregators,\n+                                 Map<String,Object> metaData) throws IOException {\n+        super(name, context, parent, pipelineAggregators, metaData);\n+        this.valuesSources = valuesSources;\n+        if (valuesSources != null && !valuesSources.isEmpty()) {\n+            stats = context.bigArrays().newObjectArray(1);\n+        }\n+    }\n+\n+    @Override\n+    public boolean needsScores() {\n+        boolean needsScores = false;\n+        if (valuesSources != null) {\n+            for (Map.Entry<String, ValuesSource.Numeric> valueSource : valuesSources.entrySet()) {\n+                needsScores |= valueSource.getValue().needsScores();\n+            }\n+        }\n+        return needsScores;\n+    }\n+\n+    @Override\n+    public LeafBucketCollector getLeafCollector(LeafReaderContext ctx,\n+                                                final LeafBucketCollector sub) throws IOException {\n+        if (valuesSources == null || valuesSources.isEmpty()) {\n+            return LeafBucketCollector.NO_OP_COLLECTOR;\n+        }\n+        final BigArrays bigArrays = context.bigArrays();\n+        final HashMap<String, SortedNumericDoubleValues> values = new HashMap<>(valuesSources.size());\n+        for (Map.Entry<String, ValuesSource.Numeric> valuesSource : valuesSources.entrySet()) {\n+            values.put(valuesSource.getKey(), valuesSource.getValue().doubleValues(ctx));\n+        }\n+\n+        return new LeafBucketCollectorBase(sub, values) {\n+            @Override\n+            public void collect(int doc, long bucket) throws IOException {\n+                // get fields\n+                Map<String, Double> fields = getFields(doc);\n+                if (fields != null) {\n+                    stats = bigArrays.grow(stats, bucket + 1);\n+                    RunningStats stat = stats.get(bucket);\n+                    // add document fields to correlation stats\n+                    if (stat == null) {\n+                        stat = new RunningStats(fields);\n+                    } else {\n+                        stat.add(fields);\n+                    }\n+                    stats.set(bucket, stat);\n+                }\n+            }\n+\n+            /**\n+             * return a map of field names and data\n+             */\n+            private Map<String, Double> getFields(int doc) {\n+                // get fieldNames to use as hash keys\n+                ArrayList<String> fieldNames = new ArrayList<>(values.keySet());\n+                HashMap<String, Double> fields = new HashMap<>(fieldNames.size());\n+\n+                // loop over fields\n+                for (String fieldName : fieldNames) {\n+                    final SortedNumericDoubleValues doubleValues = values.get(fieldName);\n+                    doubleValues.setDocument(doc);\n+                    final int valuesCount = doubleValues.count();\n+                    // if document contains an empty field we omit the doc from the correlation\n+                    if (valuesCount <= 0) {\n+                        return null;\n+                    }\n+                    // get the field value (multi-value is the average of all the values)","path":"modules/aggs-matrix-stats/src/main/java/org/elasticsearch/search/aggregations/matrix/stats/MatrixStatsAggregator.java","position":119,"original_position":119,"commit_id":"bce9bbfe9fc0ece45e87eeebdca7f1a9ad8dafd8","original_commit_id":"bce9bbfe9fc0ece45e87eeebdca7f1a9ad8dafd8","user":{"login":"nknize","id":830187,"avatar_url":"https://avatars.githubusercontent.com/u/830187?v=3","gravatar_id":"","url":"https://api.github.com/users/nknize","html_url":"https://github.com/nknize","followers_url":"https://api.github.com/users/nknize/followers","following_url":"https://api.github.com/users/nknize/following{/other_user}","gists_url":"https://api.github.com/users/nknize/gists{/gist_id}","starred_url":"https://api.github.com/users/nknize/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nknize/subscriptions","organizations_url":"https://api.github.com/users/nknize/orgs","repos_url":"https://api.github.com/users/nknize/repos","events_url":"https://api.github.com/users/nknize/events{/privacy}","received_events_url":"https://api.github.com/users/nknize/received_events","type":"User","site_admin":false},"body":"Not really. In the end multi-value fields are treated as a single observation which is technically incorrect. The correct way is to factor multi-value fields into the weighted result. This is a todo (along with handling pair-wise missing values). But I'm not sure what you mean by \"stop it working\"? Do you mean skip the multi-value document? Or throw some kind of Unsupported exception?","created_at":"2016-05-16T18:20:10Z","updated_at":"2016-05-16T18:20:10Z","html_url":"https://github.com/elastic/elasticsearch/pull/18300#discussion_r63399510","pull_request_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/18300","_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/63399510"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/18300#discussion_r63399510"},"pull_request":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/18300"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/18300","id":69880051,"html_url":"https://github.com/elastic/elasticsearch/pull/18300","diff_url":"https://github.com/elastic/elasticsearch/pull/18300.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/18300.patch","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/18300","number":18300,"state":"open","locked":false,"title":"New Matrix Stats Aggregation module","user":{"login":"nknize","id":830187,"avatar_url":"https://avatars.githubusercontent.com/u/830187?v=3","gravatar_id":"","url":"https://api.github.com/users/nknize","html_url":"https://github.com/nknize","followers_url":"https://api.github.com/users/nknize/followers","following_url":"https://api.github.com/users/nknize/following{/other_user}","gists_url":"https://api.github.com/users/nknize/gists{/gist_id}","starred_url":"https://api.github.com/users/nknize/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nknize/subscriptions","organizations_url":"https://api.github.com/users/nknize/orgs","repos_url":"https://api.github.com/users/nknize/repos","events_url":"https://api.github.com/users/nknize/events{/privacy}","received_events_url":"https://api.github.com/users/nknize/received_events","type":"User","site_admin":false},"body":"This PR adds a new aggs-matrix-stats module. The module introduces a new class of aggregations called `Matrix Aggregations`. Matrix aggregations work on multiple fields and produce a matrix as output. The matrix aggregation provided by this module is the `matrix_stats` aggregation which computes the following descriptive statistics over a set of fields:\r\n\r\n* Covariance\r\n* Correlation\r\n\r\nFor completeness (and interpretation purposes) the following per-field statistics are also provided:\r\n\r\n* sample count\r\n* population mean\r\n* population variance\r\n* population skewness\r\n* population kurtosis\r\n\r\nExample request:\r\n\r\n```javascript\r\n\"aggs\": {\r\n    \"matrixstats\": {\r\n        \"matrix_stats\": {\r\n            \"field\": [\"poverty\", \"income\"]\r\n        }\r\n     }\r\n}\r\n```\r\n\r\nExample response:\r\n```javascript\r\n\t\"aggregations\": {\r\n\t\t\"matrixstats\": {\r\n\t\t\t\"field\": [\"income\", \"poverty\"],\r\n\t\t\t\"count\": [50, 50],\r\n\t\t\t\"mean\": [51985.1, 12.732000000000001],\r\n\t\t\t\"variance\": [7.383377037755103E7, 8.637730612244896],\r\n\t\t\t\"skewness\": [0.5595114003506483, 0.4516049811903419],\r\n\t\t\t\"kurtosis\": [2.5692365287787124, 2.8615929677997767],\r\n\t\t\t\"covariance\": [\r\n\t\t\t\t[7.383377037755103E7, -21093.65836734694],\r\n\t\t\t\t[-21093.65836734694, 8.637730612244896]\r\n\t\t\t],\r\n\t\t\t\"correlation\": [\r\n\t\t\t\t[1.0, -0.8352655256272504],\r\n\t\t\t\t[-0.8352655256272504, 1.0]\r\n\t\t\t]\r\n\t\t}\r\n\t}\r\n```\r\n\r\nThis PR replaces #16826. The differences include:\r\n\r\n* renames aggregation from `multifield_stats` to `matrix_stats`\r\n* adds aggregation code as a module instead of directly to core\r\n* simplifies the json output by returning field arrays and full matrix (instead of the upper triangle)\r\n* refactors Integration Tests as REST Tests\r\n\r\nRemaining TODO:\r\n\r\n* documentation","created_at":"2016-05-12T17:59:15Z","updated_at":"2016-05-16T18:20:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2e004248495ca327e0b5a22f382961f05a6c5322","assignee":{"login":"colings86","id":236731,"avatar_url":"https://avatars.githubusercontent.com/u/236731?v=3","gravatar_id":"","url":"https://api.github.com/users/colings86","html_url":"https://github.com/colings86","followers_url":"https://api.github.com/users/colings86/followers","following_url":"https://api.github.com/users/colings86/following{/other_user}","gists_url":"https://api.github.com/users/colings86/gists{/gist_id}","starred_url":"https://api.github.com/users/colings86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colings86/subscriptions","organizations_url":"https://api.github.com/users/colings86/orgs","repos_url":"https://api.github.com/users/colings86/repos","events_url":"https://api.github.com/users/colings86/events{/privacy}","received_events_url":"https://api.github.com/users/colings86/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/18300/commits","review_comments_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/18300/comments","review_comment_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/18300/comments","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/bce9bbfe9fc0ece45e87eeebdca7f1a9ad8dafd8","head":{"label":"nknize:feature/MatrixStats-Module","ref":"feature/MatrixStats-Module","sha":"bce9bbfe9fc0ece45e87eeebdca7f1a9ad8dafd8","user":{"login":"nknize","id":830187,"avatar_url":"https://avatars.githubusercontent.com/u/830187?v=3","gravatar_id":"","url":"https://api.github.com/users/nknize","html_url":"https://github.com/nknize","followers_url":"https://api.github.com/users/nknize/followers","following_url":"https://api.github.com/users/nknize/following{/other_user}","gists_url":"https://api.github.com/users/nknize/gists{/gist_id}","starred_url":"https://api.github.com/users/nknize/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nknize/subscriptions","organizations_url":"https://api.github.com/users/nknize/orgs","repos_url":"https://api.github.com/users/nknize/repos","events_url":"https://api.github.com/users/nknize/events{/privacy}","received_events_url":"https://api.github.com/users/nknize/received_events","type":"User","site_admin":false},"repo":{"id":25872473,"name":"elasticsearch","full_name":"nknize/elasticsearch","owner":{"login":"nknize","id":830187,"avatar_url":"https://avatars.githubusercontent.com/u/830187?v=3","gravatar_id":"","url":"https://api.github.com/users/nknize","html_url":"https://github.com/nknize","followers_url":"https://api.github.com/users/nknize/followers","following_url":"https://api.github.com/users/nknize/following{/other_user}","gists_url":"https://api.github.com/users/nknize/gists{/gist_id}","starred_url":"https://api.github.com/users/nknize/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nknize/subscriptions","organizations_url":"https://api.github.com/users/nknize/orgs","repos_url":"https://api.github.com/users/nknize/repos","events_url":"https://api.github.com/users/nknize/events{/privacy}","received_events_url":"https://api.github.com/users/nknize/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nknize/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":true,"url":"https://api.github.com/repos/nknize/elasticsearch","forks_url":"https://api.github.com/repos/nknize/elasticsearch/forks","keys_url":"https://api.github.com/repos/nknize/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nknize/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nknize/elasticsearch/teams","hooks_url":"https://api.github.com/repos/nknize/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/nknize/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/nknize/elasticsearch/events","assignees_url":"https://api.github.com/repos/nknize/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/nknize/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/nknize/elasticsearch/tags","blobs_url":"https://api.github.com/repos/nknize/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nknize/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nknize/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/nknize/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nknize/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/nknize/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/nknize/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/nknize/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/nknize/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/nknize/elasticsearch/subscription","commits_url":"https://api.github.com/repos/nknize/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/nknize/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/nknize/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/nknize/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/nknize/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/nknize/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nknize/elasticsearch/merges","archive_url":"https://api.github.com/repos/nknize/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nknize/elasticsearch/downloads","issues_url":"https://api.github.com/repos/nknize/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/nknize/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/nknize/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/nknize/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nknize/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/nknize/elasticsearch/releases{/id}","deployments_url":"https://api.github.com/repos/nknize/elasticsearch/deployments","created_at":"2014-10-28T14:11:03Z","updated_at":"2015-01-23T17:50:14Z","pushed_at":"2016-05-13T18:37:53Z","git_url":"git://github.com/nknize/elasticsearch.git","ssh_url":"git@github.com:nknize/elasticsearch.git","clone_url":"https://github.com/nknize/elasticsearch.git","svn_url":"https://github.com/nknize/elasticsearch","homepage":"http://elasticsearch.org","size":210639,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"elastic:master","ref":"master","sha":"f2cc8486afdde0afce447c6d06aa3c47e2499a8b","user":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"repo":{"id":507775,"name":"elasticsearch","full_name":"elastic/elasticsearch","owner":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elastic/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":false,"url":"https://api.github.com/repos/elastic/elasticsearch","forks_url":"https://api.github.com/repos/elastic/elasticsearch/forks","keys_url":"https://api.github.com/repos/elastic/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elastic/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elastic/elasticsearch/teams","hooks_url":"https://api.github.com/repos/elastic/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/elastic/elasticsearch/events","assignees_url":"https://api.github.com/repos/elastic/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/elastic/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/elastic/elasticsearch/tags","blobs_url":"https://api.github.com/repos/elastic/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elastic/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elastic/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/elastic/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/elastic/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/elastic/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/elastic/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/elastic/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/elastic/elasticsearch/subscription","commits_url":"https://api.github.com/repos/elastic/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/elastic/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/elastic/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/elastic/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elastic/elasticsearch/merges","archive_url":"https://api.github.com/repos/elastic/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elastic/elasticsearch/downloads","issues_url":"https://api.github.com/repos/elastic/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/elastic/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/elastic/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/elastic/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elastic/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/elastic/elasticsearch/releases{/id}","deployments_url":"https://api.github.com/repos/elastic/elasticsearch/deployments","created_at":"2010-02-08T13:20:56Z","updated_at":"2016-05-16T17:42:27Z","pushed_at":"2016-05-16T18:08:57Z","git_url":"git://github.com/elastic/elasticsearch.git","ssh_url":"git@github.com:elastic/elasticsearch.git","clone_url":"https://github.com/elastic/elasticsearch.git","svn_url":"https://github.com/elastic/elasticsearch","homepage":"https://www.elastic.co/products/elasticsearch","size":314625,"stargazers_count":16459,"watchers_count":16459,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5566,"mirror_url":null,"open_issues_count":1097,"forks":5566,"open_issues":1097,"watchers":16459,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/18300"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/18300"},"issue":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/18300"},"comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/18300/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/18300/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/18300/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/elasticsearch/statuses/bce9bbfe9fc0ece45e87eeebdca7f1a9ad8dafd8"}}}}