{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/30392634","id":30392634,"diff_hunk":"@@ -390,42 +387,17 @@ public SearchRequest templateSource(String template) {\n     }\n \n     /**\n-     * The name of the stored template\n+     * The stored template\n      */\n-    public void templateName(String templateName) {\n-        this.templateName = templateName;\n-    }\n-\n-    public void templateType(ScriptService.ScriptType templateType) {\n-        this.templateType = templateType;\n-    }\n-\n-    /**\n-     * Template parameters used for rendering\n-     */\n-    public void templateParams(Map<String, Object> params) {\n-        this.templateParams = params;\n+    public void template(Template template) {\n+        this.template = template;\n     }\n \n     /**\n-     * The name of the stored template\n+     * The stored template\n      */\n-    public String templateName() {\n-        return templateName;\n-    }\n-\n-    /**\n-     * The name of the stored template\n-     */\n-    public ScriptService.ScriptType templateType() {\n-        return templateType;\n-    }\n-\n-    /**\n-     * Template parameters used for rendering\n-     */\n-    public Map<String, Object> templateParams() {\n-        return templateParams;","path":"src/main/java/org/elasticsearch/action/search/SearchRequest.java","position":86,"original_position":86,"commit_id":"353463e348f3a68bbd5855f53aa92125f20affca","original_commit_id":"353463e348f3a68bbd5855f53aa92125f20affca","user":{"login":"javanna","id":832460,"avatar_url":"https://avatars.githubusercontent.com/u/832460?v=3","gravatar_id":"","url":"https://api.github.com/users/javanna","html_url":"https://github.com/javanna","followers_url":"https://api.github.com/users/javanna/followers","following_url":"https://api.github.com/users/javanna/following{/other_user}","gists_url":"https://api.github.com/users/javanna/gists{/gist_id}","starred_url":"https://api.github.com/users/javanna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javanna/subscriptions","organizations_url":"https://api.github.com/users/javanna/orgs","repos_url":"https://api.github.com/users/javanna/repos","events_url":"https://api.github.com/users/javanna/events{/privacy}","received_events_url":"https://api.github.com/users/javanna/received_events","type":"User","site_admin":false},"body":"no both Request and RequestBuilders are java api. one can choose which one to use. you can always do client.search(SearchRequest) without going through the builder.","created_at":"2015-05-15T08:30:41Z","updated_at":"2015-05-15T08:30:41Z","html_url":"https://github.com/elastic/elasticsearch/pull/11164#discussion_r30392634","pull_request_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/11164","_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/30392634"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/11164#discussion_r30392634"},"pull_request":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/11164"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/11164","id":35412224,"html_url":"https://github.com/elastic/elasticsearch/pull/11164","diff_url":"https://github.com/elastic/elasticsearch/pull/11164.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/11164.patch","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/11164","number":11164,"state":"open","locked":false,"title":"Unify script and template requests across codebase","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":"This change unifies the way scripts and templates are specified for all instances in the codebase. It builds on the Script class added previously and adds request building and parsing support as well as the ability to transfer script objects between nodes. It also adds a Template class which aims to provide the same functionality for template APIs.\r\n\r\nNote: This PR maintains backwards compatibility with versions 1.5 and before. There will be a separate PR to remove the backwards compatibility in 2.0 once this is merged (this will also include updating the \"Breaking changes in 2.0\" doc.\r\n\r\nCloses #11091\r\n\r\nWork still to do:\r\n* [x] Update Documentation to reflect new syntax\r\n* [ ] Update JUnit tests to use new API\r\n* [ ] Add BWC tests to check old API is still supported (though deprecated)","created_at":"2015-05-14T11:00:45Z","updated_at":"2015-05-15T08:30:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"54952a753b4b615015536d5d41db8e478d0d3d76","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/11164/commits","review_comments_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/11164/comments","review_comment_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/11164/comments","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/353463e348f3a68bbd5855f53aa92125f20affca","head":{"label":"colings86:feature/scriptingUpdates","ref":"feature/scriptingUpdates","sha":"353463e348f3a68bbd5855f53aa92125f20affca","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-05-14T14:53:09Z","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":108918,"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":"3ee9ae6f9c5f2b238c046484b3d693fdc82dd756","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-05-15T02:35:48Z","pushed_at":"2015-05-15T07:51:29Z","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":"http://elasticsearch.org","size":360531,"stargazers_count":11173,"watchers_count":11173,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3524,"mirror_url":null,"open_issues_count":1140,"forks":3524,"open_issues":1140,"watchers":11173,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/11164"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/11164"},"issue":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/11164"},"comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/11164/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/11164/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/11164/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/elasticsearch/statuses/353463e348f3a68bbd5855f53aa92125f20affca"}}}}