{"action":"created","comment":{"url":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/comments/24091448","id":24091448,"diff_hunk":"@@ -0,0 +1,317 @@\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.action.termvectors;\n+\n+import com.google.common.util.concurrent.AtomicLongMap;\n+import org.apache.lucene.index.*;\n+import org.apache.lucene.search.TermStatistics;\n+import org.apache.lucene.search.similarities.DefaultSimilarity;\n+import org.apache.lucene.search.similarities.TFIDFSimilarity;\n+import org.apache.lucene.util.BytesRef;\n+import org.elasticsearch.common.Nullable;\n+import org.elasticsearch.search.dfs.AggregatedDfs;\n+\n+import java.io.IOException;\n+import java.util.HashMap;\n+import java.util.Map;\n+import java.util.Set;\n+\n+public class TermVectorsFilter {\n+    public static final int DEFAULT_MAX_QUERY_TERMS = 25;\n+    public static final int DEFAULT_MIN_TERM_FREQ = 0;\n+    public static final int DEFAULT_MAX_TERM_FREQ = Integer.MAX_VALUE;\n+    public static final int DEFAULT_MIN_DOC_FREQ = 0;\n+    public static final int DEFAULT_MAX_DOC_FREQ = Integer.MAX_VALUE;\n+    public static final int DEFAULT_MIN_WORD_LENGTH = 0;\n+    public static final int DEFAULT_MAX_WORD_LENGTH = 0;\n+\n+    private int maxNumTerms = DEFAULT_MAX_QUERY_TERMS;\n+    private int minTermFreq = DEFAULT_MIN_TERM_FREQ;\n+    private int maxTermFreq = DEFAULT_MAX_TERM_FREQ;\n+    private int minDocFreq = DEFAULT_MIN_DOC_FREQ;\n+    private int maxDocFreq = DEFAULT_MAX_DOC_FREQ;\n+    private int minWordLength = DEFAULT_MIN_WORD_LENGTH;\n+    private int maxWordLength = DEFAULT_MAX_WORD_LENGTH;\n+\n+    private Fields fields;\n+    private Fields topLevelFields;\n+    private final Set<String> selectedFields;\n+    private AggregatedDfs dfs;\n+    private Map<Term, ScoreTerm> scoreTerms;\n+    private AtomicLongMap<String> sizes;\n+    private TFIDFSimilarity similarity;\n+\n+    public TermVectorsFilter(Fields termVectorsByField, Fields topLevelFields, Set<String> selectedFields, @Nullable AggregatedDfs dfs) {\n+        this.fields = termVectorsByField;\n+        this.topLevelFields = topLevelFields;\n+        this.selectedFields = selectedFields;\n+\n+        this.dfs = dfs;\n+        this.scoreTerms = new HashMap<>();\n+        this.sizes = AtomicLongMap.create();\n+        this.similarity = new DefaultSimilarity();\n+    }\n+\n+    public void setSettings(TermVectorsRequest.FilterSettings settings) {\n+        if (settings.maxNumTerms != null) {\n+            setMaxNumTerms(settings.maxNumTerms);\n+        }\n+        if (settings.minTermFreq != null) {\n+            setMinTermFreq(settings.minTermFreq);\n+        }\n+        if (settings.maxTermFreq != null) {\n+            setMaxTermFreq(settings.maxTermFreq);\n+        }\n+        if (settings.minDocFreq != null) {\n+            setMinDocFreq(settings.minDocFreq);\n+        }\n+        if (settings.maxDocFreq != null) {\n+            setMaxDocFreq(settings.maxDocFreq);\n+        }\n+        if (settings.minWordLength != null) {\n+            setMinWordLength(settings.minWordLength);\n+        }\n+        if (settings.maxWordLength != null) {\n+            setMaxWordLength(settings.maxWordLength);\n+        }\n+    }\n+\n+    public ScoreTerm getScoreTerm(Term term) {\n+        return scoreTerms.get(term);\n+    }\n+\n+    public boolean hasScoreTerm(Term term) {\n+        return getScoreTerm(term) != null;\n+    }\n+\n+    public long size(String fieldName) {\n+        return sizes.get(fieldName);\n+    }\n+\n+    public int getMaxNumTerms() {\n+        return maxNumTerms;\n+    }\n+\n+    public int getMinTermFreq() {\n+        return minTermFreq;\n+    }\n+\n+    public int getMaxTermFreq() {\n+        return maxTermFreq;\n+    }\n+\n+    public int getMinDocFreq() {\n+        return minDocFreq;\n+    }\n+\n+    public int getMaxDocFreq() {\n+        return maxDocFreq;\n+    }\n+\n+    public int getMinWordLength() {\n+        return minWordLength;\n+    }\n+\n+    public int getMaxWordLength() {\n+        return maxWordLength;\n+    }\n+\n+    public void setMaxNumTerms(int maxNumTerms) {\n+        this.maxNumTerms = maxNumTerms;\n+    }\n+\n+    public void setMinTermFreq(int minTermFreq) {\n+        this.minTermFreq = minTermFreq;\n+    }\n+\n+    public void setMaxTermFreq(int maxTermFreq) {\n+        this.maxTermFreq = maxTermFreq;\n+    }\n+\n+    public void setMinDocFreq(int minDocFreq) {\n+        this.minDocFreq = minDocFreq;\n+    }\n+\n+    public void setMaxDocFreq(int maxDocFreq) {\n+        this.maxDocFreq = maxDocFreq;\n+    }\n+\n+    public void setMinWordLength(int minWordLength) {\n+        this.minWordLength = minWordLength;\n+    }\n+\n+    public void setMaxWordLength(int maxWordLength) {\n+        this.maxWordLength = maxWordLength;\n+    }\n+\n+    public static final class ScoreTerm {\n+        public String field;\n+        public String word;\n+        public float score;\n+\n+        ScoreTerm(String field, String word, float score) {\n+            this.field = field;\n+            this.word = word;\n+            this.score = score;\n+        }\n+\n+        void update(String field, String word, float score) {\n+            this.field = field;\n+            this.word = word;\n+            this.score = score;\n+        }\n+    }\n+\n+    public void selectBestTerms() throws IOException {\n+        TermsEnum termsEnum = null;\n+        DocsEnum docsEnum = null;\n+        TermsEnum topLevelTermsEnum = null;\n+\n+        for (String fieldName : fields) {\n+            if ((selectedFields != null) && (!selectedFields.contains(fieldName))) {\n+                continue;\n+            }\n+\n+            Terms terms = fields.terms(fieldName);\n+            Terms topLevelTerms = topLevelFields.terms(fieldName);\n+\n+            // if no terms found, take the retrieved term vector fields for stats\n+            if (topLevelTerms == null) {\n+                topLevelTerms = terms;\n+            }\n+\n+            long numDocs = getDocCount(fieldName, topLevelTerms);\n+\n+            // one queue per field name\n+            ScoreTermsQueue queue = new ScoreTermsQueue(Math.min(maxNumTerms, (int) terms.size()));\n+\n+            // select terms with highest tf-idf\n+            termsEnum = terms.iterator(termsEnum);\n+            topLevelTermsEnum = topLevelTerms.iterator(topLevelTermsEnum);\n+            while (termsEnum.next() != null) {\n+                BytesRef termBytesRef = termsEnum.term();\n+                topLevelTermsEnum.seekExact(termBytesRef);\n+                Term term = new Term(fieldName, termBytesRef);\n+\n+                TermStatistics termStats = getTermStatistics(topLevelTermsEnum, term);\n+                int freq = getTermFreq(termsEnum, docsEnum);\n+\n+                // filter terms based on stats first\n+                if (!isAccepted(freq, termStats.docFreq(), term.bytes().utf8ToString())) {\n+                    continue;\n+                }\n+\n+                // then based on a score\n+                float score = computeScore(termStats, freq, numDocs);\n+                queue.addOrUpdate(new ScoreTerm(term.field(), term.bytes().utf8ToString(), score));\n+            }\n+\n+            // retain the best terms for quick lookups\n+            ScoreTerm scoreTerm;\n+            while ((scoreTerm = queue.pop()) != null) {\n+                scoreTerms.put(new Term(scoreTerm.field, scoreTerm.word), scoreTerm);\n+                sizes.incrementAndGet(scoreTerm.field);\n+            }\n+        }\n+    }\n+\n+    private boolean isAccepted(int freq, long docFreq, String word) {\n+        // filter out words that don't occur enough times in the source\n+        if (minTermFreq > 0 && freq < minTermFreq) {\n+            return false;\n+        }\n+        // filter out words that occur in the source\n+        if (freq > maxTermFreq) {\n+            return false;\n+        }\n+        // filter out words that don't occur in enough docs\n+        if (minDocFreq > 0 && docFreq < minDocFreq) {\n+            return false;\n+        }\n+        // filter out words that occur in too many docs\n+        if (docFreq > maxDocFreq) {\n+            return false;\n+        }\n+        // index update problem?\n+        if (docFreq == 0) {\n+            return false;\n+        }\n+        // filter out words based on length\n+        int len = word.length();\n+        if (minWordLength > 0 && len < minWordLength) {\n+            return false;\n+        }\n+        if (maxWordLength > 0 && len > maxWordLength) {","path":"src/main/java/org/elasticsearch/action/termvectors/TermVectorsFilter.java","position":260,"original_position":260,"commit_id":"578b06a8e625d1b87c2c40939da241361f242439","original_commit_id":"578b06a8e625d1b87c2c40939da241361f242439","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":"Do we actually need all these if (minDocFreq|maxWordLen|... > 0) ?","created_at":"2015-02-04T15:37:39Z","updated_at":"2015-02-04T15:37:39Z","html_url":"https://github.com/elasticsearch/elasticsearch/pull/9561#discussion_r24091448","pull_request_url":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/9561","_links":{"self":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/comments/24091448"},"html":{"href":"https://github.com/elasticsearch/elasticsearch/pull/9561#discussion_r24091448"},"pull_request":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/9561"}}},"pull_request":{"url":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/9561","id":28642888,"html_url":"https://github.com/elasticsearch/elasticsearch/pull/9561","diff_url":"https://github.com/elasticsearch/elasticsearch/pull/9561.diff","patch_url":"https://github.com/elasticsearch/elasticsearch/pull/9561.patch","issue_url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/9561","number":9561,"state":"open","locked":false,"title":"Term Vectors: terms filtering","user":{"login":"alexksikes","id":43475,"avatar_url":"https://avatars.githubusercontent.com/u/43475?v=3","gravatar_id":"","url":"https://api.github.com/users/alexksikes","html_url":"https://github.com/alexksikes","followers_url":"https://api.github.com/users/alexksikes/followers","following_url":"https://api.github.com/users/alexksikes/following{/other_user}","gists_url":"https://api.github.com/users/alexksikes/gists{/gist_id}","starred_url":"https://api.github.com/users/alexksikes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexksikes/subscriptions","organizations_url":"https://api.github.com/users/alexksikes/orgs","repos_url":"https://api.github.com/users/alexksikes/repos","events_url":"https://api.github.com/users/alexksikes/events{/privacy}","received_events_url":"https://api.github.com/users/alexksikes/received_events","type":"User","site_admin":false},"body":"This adds a new feature to the Term Vectors API which allows for filtering of\r\nterms based on their tf-idf scores. With `dfs` option on, this could be useful\r\nfor finding out a good characteristic vector of a document or a set of documents.\r\nThe parameters are similar to the ones used in the MLT Query.","created_at":"2015-02-04T14:38:36Z","updated_at":"2015-02-04T15:37:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/9561/commits","review_comments_url":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/9561/comments","review_comment_url":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/comments/{number}","comments_url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/9561/comments","statuses_url":"https://api.github.com/repos/elasticsearch/elasticsearch/statuses/578b06a8e625d1b87c2c40939da241361f242439","head":{"label":"alexksikes:feature/tvs-terms-filtering","ref":"feature/tvs-terms-filtering","sha":"578b06a8e625d1b87c2c40939da241361f242439","user":{"login":"alexksikes","id":43475,"avatar_url":"https://avatars.githubusercontent.com/u/43475?v=3","gravatar_id":"","url":"https://api.github.com/users/alexksikes","html_url":"https://github.com/alexksikes","followers_url":"https://api.github.com/users/alexksikes/followers","following_url":"https://api.github.com/users/alexksikes/following{/other_user}","gists_url":"https://api.github.com/users/alexksikes/gists{/gist_id}","starred_url":"https://api.github.com/users/alexksikes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexksikes/subscriptions","organizations_url":"https://api.github.com/users/alexksikes/orgs","repos_url":"https://api.github.com/users/alexksikes/repos","events_url":"https://api.github.com/users/alexksikes/events{/privacy}","received_events_url":"https://api.github.com/users/alexksikes/received_events","type":"User","site_admin":false},"repo":{"id":15257781,"name":"elasticsearch","full_name":"alexksikes/elasticsearch","owner":{"login":"alexksikes","id":43475,"avatar_url":"https://avatars.githubusercontent.com/u/43475?v=3","gravatar_id":"","url":"https://api.github.com/users/alexksikes","html_url":"https://github.com/alexksikes","followers_url":"https://api.github.com/users/alexksikes/followers","following_url":"https://api.github.com/users/alexksikes/following{/other_user}","gists_url":"https://api.github.com/users/alexksikes/gists{/gist_id}","starred_url":"https://api.github.com/users/alexksikes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexksikes/subscriptions","organizations_url":"https://api.github.com/users/alexksikes/orgs","repos_url":"https://api.github.com/users/alexksikes/repos","events_url":"https://api.github.com/users/alexksikes/events{/privacy}","received_events_url":"https://api.github.com/users/alexksikes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alexksikes/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":true,"url":"https://api.github.com/repos/alexksikes/elasticsearch","forks_url":"https://api.github.com/repos/alexksikes/elasticsearch/forks","keys_url":"https://api.github.com/repos/alexksikes/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexksikes/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexksikes/elasticsearch/teams","hooks_url":"https://api.github.com/repos/alexksikes/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/alexksikes/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/alexksikes/elasticsearch/events","assignees_url":"https://api.github.com/repos/alexksikes/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/alexksikes/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/alexksikes/elasticsearch/tags","blobs_url":"https://api.github.com/repos/alexksikes/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexksikes/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexksikes/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexksikes/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexksikes/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/alexksikes/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/alexksikes/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/alexksikes/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/alexksikes/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/alexksikes/elasticsearch/subscription","commits_url":"https://api.github.com/repos/alexksikes/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexksikes/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexksikes/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexksikes/elasticsearch/issues/comments/{number}","contents_url":"https://api.github.com/repos/alexksikes/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/alexksikes/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexksikes/elasticsearch/merges","archive_url":"https://api.github.com/repos/alexksikes/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexksikes/elasticsearch/downloads","issues_url":"https://api.github.com/repos/alexksikes/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/alexksikes/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/alexksikes/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/alexksikes/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexksikes/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/alexksikes/elasticsearch/releases{/id}","created_at":"2013-12-17T15:15:49Z","updated_at":"2014-06-20T13:07:08Z","pushed_at":"2015-02-04T14:36:31Z","git_url":"git://github.com/alexksikes/elasticsearch.git","ssh_url":"git@github.com:alexksikes/elasticsearch.git","clone_url":"https://github.com/alexksikes/elasticsearch.git","svn_url":"https://github.com/alexksikes/elasticsearch","homepage":"http://elasticsearch.org","size":73911,"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":"elasticsearch:master","ref":"master","sha":"8b76cd76f912cede7225daee1646bef2eae61d9b","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-02-04T14:26:38Z","pushed_at":"2015-02-04T09:36:36Z","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":266602,"stargazers_count":9844,"watchers_count":9844,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3018,"mirror_url":null,"open_issues_count":931,"forks":3018,"open_issues":931,"watchers":9844,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/9561"},"html":{"href":"https://github.com/elasticsearch/elasticsearch/pull/9561"},"issue":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/9561"},"comments":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/9561/comments"},"review_comments":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/9561/comments"},"review_comment":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/9561/commits"},"statuses":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/statuses/578b06a8e625d1b87c2c40939da241361f242439"}}}}