{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/39484619","id":39484619,"diff_hunk":"@@ -0,0 +1,1077 @@\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+\n+package org.elasticsearch.search.builder;\n+\n+import com.carrotsearch.hppc.ObjectFloatHashMap;\n+import com.carrotsearch.hppc.cursors.ObjectCursor;\n+\n+import org.elasticsearch.action.support.ToXContentToBytes;\n+import org.elasticsearch.common.Nullable;\n+import org.elasticsearch.common.ParseField;\n+import org.elasticsearch.common.Strings;\n+import org.elasticsearch.common.bytes.BytesReference;\n+import org.elasticsearch.common.io.stream.StreamInput;\n+import org.elasticsearch.common.io.stream.StreamOutput;\n+import org.elasticsearch.common.io.stream.Writeable;\n+import org.elasticsearch.common.unit.TimeValue;\n+import org.elasticsearch.common.xcontent.ToXContent;\n+import org.elasticsearch.common.xcontent.XContentBuilder;\n+import org.elasticsearch.common.xcontent.XContentFactory;\n+import org.elasticsearch.common.xcontent.XContentParser;\n+import org.elasticsearch.common.xcontent.XContentType;\n+import org.elasticsearch.index.query.QueryBuilder;\n+import org.elasticsearch.index.query.QueryParseContext;\n+import org.elasticsearch.index.query.QueryParsingException;\n+import org.elasticsearch.script.Script;\n+import org.elasticsearch.search.aggregations.AbstractAggregationBuilder;\n+import org.elasticsearch.search.fetch.innerhits.InnerHitsBuilder;\n+import org.elasticsearch.search.fetch.source.FetchSourceContext;\n+import org.elasticsearch.search.highlight.HighlightBuilder;\n+import org.elasticsearch.search.internal.SearchContext;\n+import org.elasticsearch.search.rescore.RescoreBuilder;\n+import org.elasticsearch.search.sort.SortBuilder;\n+import org.elasticsearch.search.sort.SortBuilders;\n+import org.elasticsearch.search.sort.SortOrder;\n+import org.elasticsearch.search.suggest.SuggestBuilder;\n+\n+import java.io.IOException;\n+import java.util.ArrayList;\n+import java.util.Collections;\n+import java.util.List;\n+import java.util.Objects;\n+\n+/**\n+ * A search source builder allowing to easily build search source. Simple\n+ * construction using\n+ * {@link org.elasticsearch.search.builder.NewSearchSourceBuilder#searchSource()}.\n+ *\n+ * @see org.elasticsearch.action.search.SearchRequest#source(NewSearchSourceBuilder)\n+ */\n+public class NewSearchSourceBuilder extends ToXContentToBytes implements Writeable<NewSearchSourceBuilder> {\n+\n+    public static final ParseField FROM_FIELD = new ParseField(\"from\");\n+    public static final ParseField SIZE_FIELD = new ParseField(\"size\");\n+    public static final ParseField TIMEOUT_FIELD = new ParseField(\"timeout\");\n+    public static final ParseField TERMINATE_AFTER_FIELD = new ParseField(\"terminate_after\");\n+    public static final ParseField QUERY_FIELD = new ParseField(\"query\");\n+    public static final ParseField POST_FILTER_FIELD = new ParseField(\"post_filter\");\n+    public static final ParseField MIN_SCORE_FIELD = new ParseField(\"min_score\");\n+    public static final ParseField VERSION_FIELD = new ParseField(\"version\");\n+    public static final ParseField EXPLAIN_FIELD = new ParseField(\"explain\");\n+    public static final ParseField _SOURCE_FIELD = new ParseField(\"_source\");\n+    public static final ParseField FIELDS_FIELD = new ParseField(\"fields\");\n+    public static final ParseField FIELDDATA_FIELDS_FIELD = new ParseField(\"fielddata_fields\");\n+    public static final ParseField SCRIPT_FIELDS_FIELD = new ParseField(\"script_fields\");\n+    public static final ParseField SCRIPT_FIELD = new ParseField(\"script\");\n+    public static final ParseField SORT_FIELD = new ParseField(\"sort\");\n+    public static final ParseField TRACK_SCORES_FIELD = new ParseField(\"track_scores\");\n+    public static final ParseField INDICES_BOOST_FIELD = new ParseField(\"indices_boost\");\n+    public static final ParseField AGGREGATIONS_FIELD = new ParseField(\"aggregations\");\n+    public static final ParseField HIGHLIGHT_FIELD = new ParseField(\"highlight\");\n+    public static final ParseField INNER_HITS_FIELD = new ParseField(\"inner_hits\");\n+    public static final ParseField SUGGEST_FIELD = new ParseField(\"suggest\");\n+    public static final ParseField RESCORE_FIELD = new ParseField(\"rescore\");\n+    public static final ParseField STATS_FIELD = new ParseField(\"stats\");\n+\n+    /**\n+     * A static factory method to construct a new search source.\n+     */\n+    public static NewSearchSourceBuilder searchSource() {\n+        return new NewSearchSourceBuilder();\n+    }\n+\n+    /**\n+     * A static factory method to construct new search highlights.\n+     */\n+    public static HighlightBuilder highlight() {\n+        return new HighlightBuilder();\n+    }\n+\n+    private QueryBuilder<?> queryBuilder;\n+\n+    private QueryBuilder<?> postQueryBuilder;\n+\n+    private int from = -1;\n+\n+    private int size = -1;\n+\n+    private Boolean explain;\n+\n+    private Boolean version;\n+\n+    private List<BytesReference> sorts;\n+\n+    private boolean trackScores = false;\n+\n+    private Float minScore;\n+\n+    private long timeoutInMillis = -1;\n+    private int terminateAfter = SearchContext.DEFAULT_TERMINATE_AFTER;\n+\n+    private List<String> fieldNames;\n+    private List<String> fieldDataFields;\n+    private List<ScriptField> scriptFields;\n+    private FetchSourceContext fetchSourceContext;\n+\n+    private List<BytesReference> aggregations;\n+\n+    private BytesReference highlightBuilder;\n+\n+    private BytesReference suggestBuilder;\n+\n+    private BytesReference innerHitsBuilder;\n+\n+    private List<BytesReference> rescoreBuilders;\n+    private Integer defaultRescoreWindowSize;\n+\n+    private ObjectFloatHashMap<String> indexBoost = null;\n+\n+    private String[] stats;\n+\n+    /**\n+     * Constructs a new search source builder.\n+     */\n+    public NewSearchSourceBuilder() {\n+    }\n+\n+    /**\n+     * Constructs a new search source builder with a search query.\n+     *\n+     * @see org.elasticsearch.index.query.QueryBuilders\n+     */\n+    public NewSearchSourceBuilder query(QueryBuilder<?> query) {\n+        this.queryBuilder = query;\n+        return this;\n+    }\n+\n+    /**\n+     * Sets a filter that will be executed after the query has been executed and\n+     * only has affect on the search hits (not aggregations). This filter is\n+     * always executed as last filtering mechanism.\n+     */\n+    public NewSearchSourceBuilder postFilter(QueryBuilder<?> postFilter) {\n+        this.postQueryBuilder = postFilter;\n+        return this;\n+    }\n+\n+    /**\n+     * From index to start the search from. Defaults to <tt>0</tt>.\n+     */\n+    public NewSearchSourceBuilder from(int from) {\n+        this.from = from;\n+        return this;\n+    }\n+\n+    /**\n+     * The number of search hits to return. Defaults to <tt>10</tt>.\n+     */\n+    public NewSearchSourceBuilder size(int size) {\n+        this.size = size;\n+        return this;\n+    }\n+\n+    /**\n+     * Sets the minimum score below which docs will be filtered out.\n+     */\n+    public NewSearchSourceBuilder minScore(float minScore) {\n+        this.minScore = minScore;\n+        return this;\n+    }\n+\n+    /**\n+     * Should each {@link org.elasticsearch.search.SearchHit} be returned with\n+     * an explanation of the hit (ranking).\n+     */\n+    public NewSearchSourceBuilder explain(Boolean explain) {\n+        this.explain = explain;\n+        return this;\n+    }\n+\n+    /**\n+     * Should each {@link org.elasticsearch.search.SearchHit} be returned with a\n+     * version associated with it.\n+     */\n+    public NewSearchSourceBuilder version(Boolean version) {\n+        this.version = version;\n+        return this;\n+    }\n+\n+    /**\n+     * An optional timeout to control how long search is allowed to take.\n+     */\n+    public NewSearchSourceBuilder timeout(TimeValue timeout) {\n+        this.timeoutInMillis = timeout.millis();\n+        return this;\n+    }\n+\n+    /**\n+     * An optional timeout to control how long search is allowed to take.\n+     */\n+    public NewSearchSourceBuilder timeout(String timeout) {\n+        this.timeoutInMillis = TimeValue.parseTimeValue(timeout, null, getClass().getSimpleName() + \".timeout\").millis();\n+        return this;\n+    }\n+\n+    /**\n+     * An optional terminate_after to terminate the search after collecting\n+     * <code>terminateAfter</code> documents\n+     */\n+    public  NewSearchSourceBuilder terminateAfter(int terminateAfter) {\n+        if (terminateAfter <= 0) {\n+            throw new IllegalArgumentException(\"terminateAfter must be > 0\");\n+        }\n+        this.terminateAfter = terminateAfter;\n+        return this;\n+    }\n+\n+    /**\n+     * Adds a sort against the given field name and the sort ordering.\n+     *\n+     * @param name\n+     *            The name of the field\n+     * @param order\n+     *            The sort ordering\n+     * @throws IOException\n+     */\n+    public NewSearchSourceBuilder sort(String name, SortOrder order) throws IOException {\n+        return sort(SortBuilders.fieldSort(name).order(order));\n+    }\n+\n+    /**\n+     * Add a sort against the given field name.\n+     *\n+     * @param name\n+     *            The name of the field to sort by\n+     * @throws IOException\n+     */\n+    public NewSearchSourceBuilder sort(String name) throws IOException {\n+        return sort(SortBuilders.fieldSort(name));\n+    }\n+\n+    /**\n+     * Adds a sort builder.\n+     */\n+    public NewSearchSourceBuilder sort(SortBuilder sort) throws IOException {\n+        if (sorts == null) {\n+            sorts = new ArrayList<>();\n+        }\n+        XContentBuilder builder = XContentFactory.jsonBuilder();\n+        sort.toXContent(builder, EMPTY_PARAMS);\n+        sorts.add(builder.bytes());\n+        return this;\n+    }\n+\n+    /**\n+     * Applies when sorting, and controls if scores will be tracked as well.\n+     * Defaults to <tt>false</tt>.\n+     */\n+    public NewSearchSourceBuilder trackScores(boolean trackScores) {\n+        this.trackScores = trackScores;\n+        return this;\n+    }\n+\n+    /**\n+     * Add an get to perform as part of the search.\n+     */\n+    public NewSearchSourceBuilder aggregation(AbstractAggregationBuilder aggregation) throws IOException {\n+        if (aggregations == null) {\n+            aggregations = new ArrayList<>();\n+        }\n+        XContentBuilder builder = XContentFactory.jsonBuilder();\n+        aggregation.toXContent(builder, EMPTY_PARAMS);\n+        aggregations.add(builder.bytes());\n+        return this;\n+    }\n+\n+    /**\n+     * Set the rescore window size for rescores that don't specify their window.\n+     */\n+    public NewSearchSourceBuilder defaultRescoreWindowSize(int defaultRescoreWindowSize) {\n+        this.defaultRescoreWindowSize = defaultRescoreWindowSize;\n+        return this;\n+    }\n+\n+    /**\n+     * Adds highlight to perform as part of the search.\n+     */\n+    public NewSearchSourceBuilder highlight(HighlightBuilder highlightBuilder) throws IOException {\n+        XContentBuilder builder = XContentFactory.jsonBuilder();\n+        highlightBuilder.toXContent(builder, EMPTY_PARAMS);\n+        this.highlightBuilder = builder.bytes();\n+        return this;\n+    }\n+\n+    public NewSearchSourceBuilder innerHits(InnerHitsBuilder innerHitsBuilder) throws IOException {\n+        XContentBuilder builder = XContentFactory.jsonBuilder();\n+        innerHitsBuilder.toXContent(builder, EMPTY_PARAMS);\n+        this.innerHitsBuilder = builder.bytes();\n+        return this;\n+    }\n+\n+    public NewSearchSourceBuilder suggest(SuggestBuilder suggestBuilder) throws IOException {\n+        XContentBuilder builder = XContentFactory.jsonBuilder();\n+        suggestBuilder.toXContent(builder, EMPTY_PARAMS);\n+        this.suggestBuilder = builder.bytes();\n+        return this;\n+    }\n+\n+    public NewSearchSourceBuilder addRescorer(RescoreBuilder rescoreBuilder) throws IOException {\n+        if (rescoreBuilders == null) {\n+            rescoreBuilders = new ArrayList<>();\n+        }\n+        XContentBuilder builder = XContentFactory.jsonBuilder();\n+        rescoreBuilder.toXContent(builder, EMPTY_PARAMS);\n+        rescoreBuilders.add(builder.bytes());\n+        return this;\n+    }\n+\n+    public NewSearchSourceBuilder clearRescorers() {\n+        rescoreBuilders = null;\n+        return this;\n+    }\n+\n+    /**\n+     * Indicates whether the response should contain the stored _source for\n+     * every hit\n+     */\n+    public NewSearchSourceBuilder fetchSource(boolean fetch) {\n+        if (this.fetchSourceContext == null) {\n+            this.fetchSourceContext = new FetchSourceContext(fetch);\n+        } else {\n+            this.fetchSourceContext.fetchSource(fetch);\n+        }\n+        return this;\n+    }\n+\n+    /**\n+     * Indicate that _source should be returned with every hit, with an\n+     * \"include\" and/or \"exclude\" set which can include simple wildcard\n+     * elements.\n+     *\n+     * @param include\n+     *            An optional include (optionally wildcarded) pattern to filter\n+     *            the returned _source\n+     * @param exclude\n+     *            An optional exclude (optionally wildcarded) pattern to filter\n+     *            the returned _source\n+     */\n+    public NewSearchSourceBuilder fetchSource(@Nullable String include, @Nullable String exclude) {\n+        return fetchSource(include == null ? Strings.EMPTY_ARRAY : new String[] { include }, exclude == null ? Strings.EMPTY_ARRAY\n+                : new String[] { exclude });\n+    }\n+\n+    /**\n+     * Indicate that _source should be returned with every hit, with an\n+     * \"include\" and/or \"exclude\" set which can include simple wildcard\n+     * elements.\n+     *\n+     * @param includes\n+     *            An optional list of include (optionally wildcarded) pattern to\n+     *            filter the returned _source\n+     * @param excludes\n+     *            An optional list of exclude (optionally wildcarded) pattern to\n+     *            filter the returned _source\n+     */\n+    public NewSearchSourceBuilder fetchSource(@Nullable String[] includes, @Nullable String[] excludes) {\n+        fetchSourceContext = new FetchSourceContext(includes, excludes);\n+        return this;\n+    }\n+\n+    /**\n+     * Indicate how the _source should be fetched.\n+     */\n+    public NewSearchSourceBuilder fetchSource(@Nullable FetchSourceContext fetchSourceContext) {\n+        this.fetchSourceContext = fetchSourceContext;\n+        return this;\n+    }\n+\n+    /**\n+     * Sets no fields to be loaded, resulting in only id and type to be returned\n+     * per field.\n+     */\n+    public NewSearchSourceBuilder noFields() {\n+        this.fieldNames = Collections.emptyList();\n+        return this;\n+    }\n+\n+    /**\n+     * Sets the fields to load and return as part of the search request. If none\n+     * are specified, the source of the document will be returned.\n+     */\n+    public NewSearchSourceBuilder fields(List<String> fields) {","path":"core/src/main/java/org/elasticsearch/search/builder/NewSearchSourceBuilder.java","position":418,"original_position":418,"commit_id":"dd0eb8dea0ddbc31252074a640af3f514e962399","original_commit_id":"dd0eb8dea0ddbc31252074a640af3f514e962399","user":{"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},"body":"Yeah, personally I would prefer to use setter which set rather than append so I would be in favour of using this one.","created_at":"2015-09-15T08:15:02Z","updated_at":"2015-09-15T08:15:02Z","html_url":"https://github.com/elastic/elasticsearch/pull/13556#discussion_r39484619","pull_request_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/13556","_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/39484619"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/13556#discussion_r39484619"},"pull_request":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/13556"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/13556","id":44924868,"html_url":"https://github.com/elastic/elasticsearch/pull/13556","diff_url":"https://github.com/elastic/elasticsearch/pull/13556.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/13556.patch","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/13556","number":13556,"state":"open","locked":false,"title":"Modify search request to incorporate query refactoring","user":{"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},"body":"","created_at":"2015-09-14T12:39:41Z","updated_at":"2015-09-15T08:15:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6f653270da4c9a35ea5fb443faf94cba463babfd","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/13556/commits","review_comments_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/13556/comments","review_comment_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/13556/comments","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/dd0eb8dea0ddbc31252074a640af3f514e962399","head":{"label":"colings86:refactor/searchRequestBytes","ref":"refactor/searchRequestBytes","sha":"dd0eb8dea0ddbc31252074a640af3f514e962399","user":{"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},"repo":{"id":19935914,"name":"elasticsearch","full_name":"colings86/elasticsearch","owner":{"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},"private":false,"html_url":"https://github.com/colings86/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":true,"url":"https://api.github.com/repos/colings86/elasticsearch","forks_url":"https://api.github.com/repos/colings86/elasticsearch/forks","keys_url":"https://api.github.com/repos/colings86/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/colings86/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/colings86/elasticsearch/teams","hooks_url":"https://api.github.com/repos/colings86/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/colings86/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/colings86/elasticsearch/events","assignees_url":"https://api.github.com/repos/colings86/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/colings86/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/colings86/elasticsearch/tags","blobs_url":"https://api.github.com/repos/colings86/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/colings86/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/colings86/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/colings86/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/colings86/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/colings86/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/colings86/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/colings86/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/colings86/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/colings86/elasticsearch/subscription","commits_url":"https://api.github.com/repos/colings86/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/colings86/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/colings86/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/colings86/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/colings86/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/colings86/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/colings86/elasticsearch/merges","archive_url":"https://api.github.com/repos/colings86/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/colings86/elasticsearch/downloads","issues_url":"https://api.github.com/repos/colings86/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/colings86/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/colings86/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/colings86/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/colings86/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/colings86/elasticsearch/releases{/id}","created_at":"2014-05-19T09:22:57Z","updated_at":"2015-05-07T08:53:54Z","pushed_at":"2015-09-14T14:19:17Z","git_url":"git://github.com/colings86/elasticsearch.git","ssh_url":"git@github.com:colings86/elasticsearch.git","clone_url":"https://github.com/colings86/elasticsearch.git","svn_url":"https://github.com/colings86/elasticsearch","homepage":"http://elasticsearch.org","size":138490,"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:feature/query-refactoring","ref":"feature/query-refactoring","sha":"adaa998225794d47ba17fd40efb5108ab47879a4","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}","created_at":"2010-02-08T13:20:56Z","updated_at":"2015-09-15T07:33:24Z","pushed_at":"2015-09-15T07:59:07Z","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":422152,"stargazers_count":12729,"watchers_count":12729,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4120,"mirror_url":null,"open_issues_count":1236,"forks":4120,"open_issues":1236,"watchers":12729,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/13556"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/13556"},"issue":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/13556"},"comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/13556/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/13556/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/13556/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/elasticsearch/statuses/dd0eb8dea0ddbc31252074a640af3f514e962399"}}}}