diff --git a/src/CodeGeneration/CodeGeneration.LowLevelClient/Overrides/Descriptors/SearchDescriptorOverrides.cs b/src/CodeGeneration/CodeGeneration.LowLevelClient/Overrides/Descriptors/SearchDescriptorOverrides.cs index e7e5bbd0631..5fcb1bdfee0 100644 --- a/src/CodeGeneration/CodeGeneration.LowLevelClient/Overrides/Descriptors/SearchDescriptorOverrides.cs +++ b/src/CodeGeneration/CodeGeneration.LowLevelClient/Overrides/Descriptors/SearchDescriptorOverrides.cs @@ -25,7 +25,8 @@ public IEnumerable SkipQueryStringParams "sort", "_source", "_source_include", - "_source_exclude" + "_source_exclude", + "track_scores" }; } } diff --git a/src/Elasticsearch.Net/Domain/RequestParameters/RequestParameters.Generated.cs b/src/Elasticsearch.Net/Domain/RequestParameters/RequestParameters.Generated.cs index 6fb1721bb92..e743ae7565b 100644 --- a/src/Elasticsearch.Net/Domain/RequestParameters/RequestParameters.Generated.cs +++ b/src/Elasticsearch.Net/Domain/RequestParameters/RequestParameters.Generated.cs @@ -1683,6 +1683,26 @@ public DeleteByQueryRequestParameters Timeout(string timeout) } + ///Request parameters descriptor for DeleteScript + ///
+	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html
+	///
+ ///
+ public class DeleteScriptRequestParameters : FluentRequestParameters + { + } + + + ///Request parameters descriptor for DeleteTemplate + ///
+	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html
+	///
+ ///
+ public class DeleteTemplateRequestParameters : FluentRequestParameters + { + } + + ///Request parameters descriptor for Exists ///
 	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-get.html
@@ -2043,6 +2063,16 @@ public GetRequestParameters VersionType(VersionType version_type)
 	}
 	
 	
+	///Request parameters descriptor for GetScript
+	///
+	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html
+	///
+ ///
+ public class GetScriptRequestParameters : FluentRequestParameters + { + } + + ///Request parameters descriptor for GetSource ///
 	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-get.html
@@ -2163,6 +2193,16 @@ public SourceRequestParameters VersionType(VersionType version_type)
 	}
 	
 	
+	///Request parameters descriptor for GetTemplate
+	///
+	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html
+	///
+ ///
+ public class GetTemplateRequestParameters : FluentRequestParameters + { + } + + ///Request parameters descriptor for Index ///
 	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-index_.html
@@ -2683,36 +2723,6 @@ public DeleteMappingRequestParameters MasterTimeout(string master_timeout)
 	}
 	
 	
-	///Request parameters descriptor for IndicesDeleteTemplateForAll
-	///
-	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-templates.html
-	///
- ///
- public class DeleteTemplateRequestParameters : FluentRequestParameters - { - - internal string _timeout { get; set; } - ///Explicit operation timeout - public DeleteTemplateRequestParameters Timeout(string timeout) - { - this._timeout = timeout; - this.AddQueryString("timeout", this._timeout); - return this; - } - - - internal string _master_timeout { get; set; } - ///Specify timeout for connection to master - public DeleteTemplateRequestParameters MasterTimeout(string master_timeout) - { - this._master_timeout = master_timeout; - this.AddQueryString("master_timeout", this._master_timeout); - return this; - } - - } - - ///Request parameters descriptor for IndicesDeleteWarmer ///
 	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-warmers.html
@@ -3213,36 +3223,6 @@ public GetIndexSettingsRequestParameters Local(bool local)
 	}
 	
 	
-	///Request parameters descriptor for IndicesGetTemplateForAll
-	///
-	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-templates.html
-	///
- ///
- public class GetTemplateRequestParameters : FluentRequestParameters - { - - internal bool _flat_settings { get; set; } - ///Return settings in flat format (default: false) - public GetTemplateRequestParameters FlatSettings(bool flat_settings) - { - this._flat_settings = flat_settings; - this.AddQueryString("flat_settings", this._flat_settings); - return this; - } - - - internal bool _local { get; set; } - ///Return local information, do not retrieve the state from master node (default: false) - public GetTemplateRequestParameters Local(bool local) - { - this._local = local; - this.AddQueryString("local", this._local); - return this; - } - - } - - ///Request parameters descriptor for IndicesGetWarmerForAll ///
 	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-warmers.html
@@ -3621,6 +3601,16 @@ public UpdateSettingsRequestParameters FlatSettings(bool flat_settings)
 	public class PutTemplateRequestParameters : FluentRequestParameters 
 	{
 		
+		internal bool _create { get; set; }
+		///Whether the index template should only be added if new or can also replace an existing one
+		public PutTemplateRequestParameters Create(bool create)
+		{
+			this._create = create;
+			this.AddQueryString("create", this._create);
+			return this;
+		}
+		
+		
 		internal string _timeout { get; set; }
 		///Explicit operation timeout
 		public PutTemplateRequestParameters Timeout(string timeout)
@@ -3901,9 +3891,9 @@ public IndicesStatsRequestParameters Fields(params string[] fields)
 		}
 		
 		
-		internal bool _groups { get; set; }
+		internal  string[] _groups { get; set; }
 		///A comma-separated list of search groups for `search` index metric
-		public IndicesStatsRequestParameters Groups(bool groups)
+		public IndicesStatsRequestParameters Groups(params string[] groups)
 		{
 			this._groups = groups;
 			this.AddQueryString("groups", this._groups);
@@ -4893,6 +4883,16 @@ public class PingRequestParameters : FluentRequestParametersRequest parameters descriptor for PutScript
+	///
+	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html
+	///
+ ///
+ public class PutScriptRequestParameters : FluentRequestParameters + { + } + + ///Request parameters descriptor for ScrollGet ///
 	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-request-scroll.html
diff --git a/src/Elasticsearch.Net/ElasticsearchClient.Generated.cs b/src/Elasticsearch.Net/ElasticsearchClient.Generated.cs
index 27ccedbf40f..258985436f6 100644
--- a/src/Elasticsearch.Net/ElasticsearchClient.Generated.cs
+++ b/src/Elasticsearch.Net/ElasticsearchClient.Generated.cs
@@ -7913,6 +7913,294 @@ public Task> DeleteByQueryAsync(string
 			));
 		}
 		
+		///Represents a DELETE on /_scripts/{lang}/{id}
+		///Returns: ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+	    ///
+		///Script language
+		///Script ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		public ElasticsearchResponse DeleteScript(string lang, string id, Func requestParameters = null)
+		{
+			lang.ThrowIfNullOrEmpty("lang");
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_scripts/{0}/{1}".F(Encoded(lang), Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new DeleteScriptRequestParameters());
+			}
+				
+
+
+			return this.DoRequest(
+				"DELETE", url, data: null, 
+				requestParameters: requestParams
+			);
+		}
+		
+		///Represents a DELETE on /_scripts/{lang}/{id}
+		///Returns: A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+	    ///
+		///Script language
+		///Script ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		public Task> DeleteScriptAsync(string lang, string id, Func requestParameters = null)
+		{
+			lang.ThrowIfNullOrEmpty("lang");
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_scripts/{0}/{1}".F(Encoded(lang), Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new DeleteScriptRequestParameters());
+			}
+				
+
+
+			return this.DoRequestAsync(
+				"DELETE", url, data: null, 
+				requestParameters: requestParams
+			);
+		}
+		
+		///Represents a DELETE on /_scripts/{lang}/{id}
+		///Returns: ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+	    ///
+		///Script language
+		///Script ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		public ElasticsearchResponse DeleteScript(string lang, string id, Func requestParameters = null)
+		{
+			lang.ThrowIfNullOrEmpty("lang");
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_scripts/{0}/{1}".F(Encoded(lang), Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new DeleteScriptRequestParameters());
+			}
+				
+
+
+			return ElasticsearchResponse.Wrap(this.DoRequest>(
+				"DELETE", url, data: null, 
+				requestParameters: requestParams
+			));
+		}
+		
+		///Represents a DELETE on /_scripts/{lang}/{id}
+		///Returns: Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+	    ///
+		///Script language
+		///Script ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		public Task> DeleteScriptAsync(string lang, string id, Func requestParameters = null)
+		{
+			lang.ThrowIfNullOrEmpty("lang");
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_scripts/{0}/{1}".F(Encoded(lang), Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new DeleteScriptRequestParameters());
+			}
+				
+
+
+			return ElasticsearchResponse.WrapAsync(this.DoRequestAsync>(
+				"DELETE", url, data: null, 
+				requestParameters: requestParams
+			));
+		}
+		
+		///Represents a DELETE on /_search/template/{id}
+		///Returns: ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+	    ///
+		///Template ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		public ElasticsearchResponse DeleteTemplate(string id, Func requestParameters = null)
+		{
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_search/template/{0}".F(Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new DeleteTemplateRequestParameters());
+			}
+				
+
+
+			return this.DoRequest(
+				"DELETE", url, data: null, 
+				requestParameters: requestParams
+			);
+		}
+		
+		///Represents a DELETE on /_search/template/{id}
+		///Returns: A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+	    ///
+		///Template ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		public Task> DeleteTemplateAsync(string id, Func requestParameters = null)
+		{
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_search/template/{0}".F(Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new DeleteTemplateRequestParameters());
+			}
+				
+
+
+			return this.DoRequestAsync(
+				"DELETE", url, data: null, 
+				requestParameters: requestParams
+			);
+		}
+		
+		///Represents a DELETE on /_search/template/{id}
+		///Returns: ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+	    ///
+		///Template ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		public ElasticsearchResponse DeleteTemplate(string id, Func requestParameters = null)
+		{
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_search/template/{0}".F(Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new DeleteTemplateRequestParameters());
+			}
+				
+
+
+			return ElasticsearchResponse.Wrap(this.DoRequest>(
+				"DELETE", url, data: null, 
+				requestParameters: requestParams
+			));
+		}
+		
+		///Represents a DELETE on /_search/template/{id}
+		///Returns: Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+	    ///
+		///Template ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		public Task> DeleteTemplateAsync(string id, Func requestParameters = null)
+		{
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_search/template/{0}".F(Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new DeleteTemplateRequestParameters());
+			}
+				
+
+
+			return ElasticsearchResponse.WrapAsync(this.DoRequestAsync>(
+				"DELETE", url, data: null, 
+				requestParameters: requestParams
+			));
+		}
+		
 		///Represents a HEAD on /{index}/{type}/{id}
 		///Returns: ElasticsearchResponse<T> holding the reponse body deserialized as T.
 		/// - If T is of type byte[] deserialization will be shortcircuited
@@ -8565,15 +8853,14 @@ public Task> GetAsync(string index, str
 			));
 		}
 		
-		///Represents a GET on /{index}/{type}/{id}/_source
+		///Represents a GET on /_scripts/{lang}/{id}
 		///Returns: ElasticsearchResponse<T> holding the reponse body deserialized as T.
 		/// - If T is of type byte[] deserialization will be shortcircuited
 		/// - If T is of type VoidResponse the response stream will be ignored completely
-	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-get.html	
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
 	    ///
-		///The name of the index
-		///The type of the document; use `_all` to fetch the first document matching the ID across all types
-		///The document ID
+		///Script language
+		///Script ID
 		///
 		///Optional function to specify any additional request parameters 
 		///Querystring values, connection configuration specific to this request, deserialization state.
@@ -8582,17 +8869,16 @@ public Task> GetAsync(string index, str
 		/// - If T is of type byte[] deserialization will be shortcircuited
 		/// - If T is of type VoidResponse the response stream will be ignored completely
 		///
-		public ElasticsearchResponse GetSource(string index, string type, string id, Func requestParameters = null)
+		public ElasticsearchResponse GetScript(string lang, string id, Func requestParameters = null)
 		{
-			index.ThrowIfNullOrEmpty("index");
-			type.ThrowIfNullOrEmpty("type");
+			lang.ThrowIfNullOrEmpty("lang");
 			id.ThrowIfNullOrEmpty("id");
-			var url = "{0}/{1}/{2}/_source".F(Encoded(index), Encoded(type), Encoded(id));
+			var url = "_scripts/{0}/{1}".F(Encoded(lang), Encoded(id));
 			IRequestParameters requestParams = null;
 				
 			if (requestParameters != null)
 			{
-				requestParams = requestParameters(new SourceRequestParameters());
+				requestParams = requestParameters(new GetScriptRequestParameters());
 			}
 				
 
@@ -8603,15 +8889,14 @@ public ElasticsearchResponse GetSource(string index, string type, string i
 			);
 		}
 		
-		///Represents a GET on /{index}/{type}/{id}/_source
+		///Represents a GET on /_scripts/{lang}/{id}
 		///Returns: A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
 		/// - If T is of type byte[] deserialization will be shortcircuited
 		/// - If T is of type VoidResponse the response stream will be ignored completely
-	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-get.html	
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
 	    ///
-		///The name of the index
-		///The type of the document; use `_all` to fetch the first document matching the ID across all types
-		///The document ID
+		///Script language
+		///Script ID
 		///
 		///Optional function to specify any additional request parameters 
 		///Querystring values, connection configuration specific to this request, deserialization state.
@@ -8620,17 +8905,168 @@ public ElasticsearchResponse GetSource(string index, string type, string i
 		/// - If T is of type byte[] deserialization will be shortcircuited
 		/// - If T is of type VoidResponse the response stream will be ignored completely
 		///
-		public Task> GetSourceAsync(string index, string type, string id, Func requestParameters = null)
+		public Task> GetScriptAsync(string lang, string id, Func requestParameters = null)
 		{
-			index.ThrowIfNullOrEmpty("index");
-			type.ThrowIfNullOrEmpty("type");
+			lang.ThrowIfNullOrEmpty("lang");
 			id.ThrowIfNullOrEmpty("id");
-			var url = "{0}/{1}/{2}/_source".F(Encoded(index), Encoded(type), Encoded(id));
+			var url = "_scripts/{0}/{1}".F(Encoded(lang), Encoded(id));
 			IRequestParameters requestParams = null;
 				
 			if (requestParameters != null)
 			{
-				requestParams = requestParameters(new SourceRequestParameters());
+				requestParams = requestParameters(new GetScriptRequestParameters());
+			}
+				
+
+
+			return this.DoRequestAsync(
+				"GET", url, data: null, 
+				requestParameters: requestParams
+			);
+		}
+		
+		///Represents a GET on /_scripts/{lang}/{id}
+		///Returns: ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+	    ///
+		///Script language
+		///Script ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		public ElasticsearchResponse GetScript(string lang, string id, Func requestParameters = null)
+		{
+			lang.ThrowIfNullOrEmpty("lang");
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_scripts/{0}/{1}".F(Encoded(lang), Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new GetScriptRequestParameters());
+			}
+				
+
+
+			return ElasticsearchResponse.Wrap(this.DoRequest>(
+				"GET", url, data: null, 
+				requestParameters: requestParams
+			));
+		}
+		
+		///Represents a GET on /_scripts/{lang}/{id}
+		///Returns: Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+	    ///
+		///Script language
+		///Script ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		public Task> GetScriptAsync(string lang, string id, Func requestParameters = null)
+		{
+			lang.ThrowIfNullOrEmpty("lang");
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_scripts/{0}/{1}".F(Encoded(lang), Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new GetScriptRequestParameters());
+			}
+				
+
+
+			return ElasticsearchResponse.WrapAsync(this.DoRequestAsync>(
+				"GET", url, data: null, 
+				requestParameters: requestParams
+			));
+		}
+		
+		///Represents a GET on /{index}/{type}/{id}/_source
+		///Returns: ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-get.html	
+	    ///
+		///The name of the index
+		///The type of the document; use `_all` to fetch the first document matching the ID across all types
+		///The document ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		public ElasticsearchResponse GetSource(string index, string type, string id, Func requestParameters = null)
+		{
+			index.ThrowIfNullOrEmpty("index");
+			type.ThrowIfNullOrEmpty("type");
+			id.ThrowIfNullOrEmpty("id");
+			var url = "{0}/{1}/{2}/_source".F(Encoded(index), Encoded(type), Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new SourceRequestParameters());
+			}
+				
+
+
+			return this.DoRequest(
+				"GET", url, data: null, 
+				requestParameters: requestParams
+			);
+		}
+		
+		///Represents a GET on /{index}/{type}/{id}/_source
+		///Returns: A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-get.html	
+	    ///
+		///The name of the index
+		///The type of the document; use `_all` to fetch the first document matching the ID across all types
+		///The document ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		public Task> GetSourceAsync(string index, string type, string id, Func requestParameters = null)
+		{
+			index.ThrowIfNullOrEmpty("index");
+			type.ThrowIfNullOrEmpty("type");
+			id.ThrowIfNullOrEmpty("id");
+			var url = "{0}/{1}/{2}/_source".F(Encoded(index), Encoded(type), Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new SourceRequestParameters());
 			}
 				
 
@@ -8715,6 +9151,146 @@ public Task> GetSourceAsync(string inde
 				
 
 
+			return ElasticsearchResponse.WrapAsync(this.DoRequestAsync>(
+				"GET", url, data: null, 
+				requestParameters: requestParams
+			));
+		}
+		
+		///Represents a GET on /_search/template/{id}
+		///Returns: ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+	    ///
+		///Template ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		public ElasticsearchResponse GetTemplate(string id, Func requestParameters = null)
+		{
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_search/template/{0}".F(Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new GetTemplateRequestParameters());
+			}
+				
+
+
+			return this.DoRequest(
+				"GET", url, data: null, 
+				requestParameters: requestParams
+			);
+		}
+		
+		///Represents a GET on /_search/template/{id}
+		///Returns: A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+	    ///
+		///Template ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		public Task> GetTemplateAsync(string id, Func requestParameters = null)
+		{
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_search/template/{0}".F(Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new GetTemplateRequestParameters());
+			}
+				
+
+
+			return this.DoRequestAsync(
+				"GET", url, data: null, 
+				requestParameters: requestParams
+			);
+		}
+		
+		///Represents a GET on /_search/template/{id}
+		///Returns: ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+	    ///
+		///Template ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		public ElasticsearchResponse GetTemplate(string id, Func requestParameters = null)
+		{
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_search/template/{0}".F(Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new GetTemplateRequestParameters());
+			}
+				
+
+
+			return ElasticsearchResponse.Wrap(this.DoRequest>(
+				"GET", url, data: null, 
+				requestParameters: requestParams
+			));
+		}
+		
+		///Represents a GET on /_search/template/{id}
+		///Returns: Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+	    ///
+		///Template ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		public Task> GetTemplateAsync(string id, Func requestParameters = null)
+		{
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_search/template/{0}".F(Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new GetTemplateRequestParameters());
+			}
+				
+
+
 			return ElasticsearchResponse.WrapAsync(this.DoRequestAsync>(
 				"GET", url, data: null, 
 				requestParameters: requestParams
@@ -30205,6 +30781,598 @@ public Task> PingAsync(FuncRepresents a PUT on /_scripts/{lang}/{id}
+		///Returns: ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+	    ///
+		///Script language
+		///Script ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		public ElasticsearchResponse PutScript(string lang, string id, object body, Func requestParameters = null)
+		{
+			lang.ThrowIfNullOrEmpty("lang");
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_scripts/{0}/{1}".F(Encoded(lang), Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new PutScriptRequestParameters());
+			}
+				
+
+
+			return this.DoRequest(
+				"PUT", url, body, 
+				requestParameters: requestParams
+			);
+		}
+		
+		///Represents a PUT on /_scripts/{lang}/{id}
+		///Returns: A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+	    ///
+		///Script language
+		///Script ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		public Task> PutScriptAsync(string lang, string id, object body, Func requestParameters = null)
+		{
+			lang.ThrowIfNullOrEmpty("lang");
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_scripts/{0}/{1}".F(Encoded(lang), Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new PutScriptRequestParameters());
+			}
+				
+
+
+			return this.DoRequestAsync(
+				"PUT", url, body, 
+				requestParameters: requestParams
+			);
+		}
+		
+		///Represents a PUT on /_scripts/{lang}/{id}
+		///Returns: ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+	    ///
+		///Script language
+		///Script ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		public ElasticsearchResponse PutScript(string lang, string id, object body, Func requestParameters = null)
+		{
+			lang.ThrowIfNullOrEmpty("lang");
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_scripts/{0}/{1}".F(Encoded(lang), Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new PutScriptRequestParameters());
+			}
+				
+
+
+			return ElasticsearchResponse.Wrap(this.DoRequest>(
+				"PUT", url, body, 
+				requestParameters: requestParams
+			));
+		}
+		
+		///Represents a PUT on /_scripts/{lang}/{id}
+		///Returns: Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+	    ///
+		///Script language
+		///Script ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		public Task> PutScriptAsync(string lang, string id, object body, Func requestParameters = null)
+		{
+			lang.ThrowIfNullOrEmpty("lang");
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_scripts/{0}/{1}".F(Encoded(lang), Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new PutScriptRequestParameters());
+			}
+				
+
+
+			return ElasticsearchResponse.WrapAsync(this.DoRequestAsync>(
+				"PUT", url, body, 
+				requestParameters: requestParams
+			));
+		}
+		
+		///Represents a POST on /_scripts/{lang}/{id}
+		///Returns: ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+	    ///
+		///Script language
+		///Script ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		public ElasticsearchResponse PutScriptPost(string lang, string id, object body, Func requestParameters = null)
+		{
+			lang.ThrowIfNullOrEmpty("lang");
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_scripts/{0}/{1}".F(Encoded(lang), Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new PutScriptRequestParameters());
+			}
+				
+
+
+			return this.DoRequest(
+				"POST", url, body, 
+				requestParameters: requestParams
+			);
+		}
+		
+		///Represents a POST on /_scripts/{lang}/{id}
+		///Returns: A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+	    ///
+		///Script language
+		///Script ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		public Task> PutScriptPostAsync(string lang, string id, object body, Func requestParameters = null)
+		{
+			lang.ThrowIfNullOrEmpty("lang");
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_scripts/{0}/{1}".F(Encoded(lang), Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new PutScriptRequestParameters());
+			}
+				
+
+
+			return this.DoRequestAsync(
+				"POST", url, body, 
+				requestParameters: requestParams
+			);
+		}
+		
+		///Represents a POST on /_scripts/{lang}/{id}
+		///Returns: ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+	    ///
+		///Script language
+		///Script ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		public ElasticsearchResponse PutScriptPost(string lang, string id, object body, Func requestParameters = null)
+		{
+			lang.ThrowIfNullOrEmpty("lang");
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_scripts/{0}/{1}".F(Encoded(lang), Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new PutScriptRequestParameters());
+			}
+				
+
+
+			return ElasticsearchResponse.Wrap(this.DoRequest>(
+				"POST", url, body, 
+				requestParameters: requestParams
+			));
+		}
+		
+		///Represents a POST on /_scripts/{lang}/{id}
+		///Returns: Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+	    ///
+		///Script language
+		///Script ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		public Task> PutScriptPostAsync(string lang, string id, object body, Func requestParameters = null)
+		{
+			lang.ThrowIfNullOrEmpty("lang");
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_scripts/{0}/{1}".F(Encoded(lang), Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new PutScriptRequestParameters());
+			}
+				
+
+
+			return ElasticsearchResponse.WrapAsync(this.DoRequestAsync>(
+				"POST", url, body, 
+				requestParameters: requestParams
+			));
+		}
+		
+		///Represents a PUT on /_search/template/{id}
+		///Returns: ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+	    ///
+		///Template ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		public ElasticsearchResponse PutTemplate(string id, object body, Func requestParameters = null)
+		{
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_search/template/{0}".F(Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new PutTemplateRequestParameters());
+			}
+				
+
+
+			return this.DoRequest(
+				"PUT", url, body, 
+				requestParameters: requestParams
+			);
+		}
+		
+		///Represents a PUT on /_search/template/{id}
+		///Returns: A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+	    ///
+		///Template ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		public Task> PutTemplateAsync(string id, object body, Func requestParameters = null)
+		{
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_search/template/{0}".F(Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new PutTemplateRequestParameters());
+			}
+				
+
+
+			return this.DoRequestAsync(
+				"PUT", url, body, 
+				requestParameters: requestParams
+			);
+		}
+		
+		///Represents a PUT on /_search/template/{id}
+		///Returns: ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+	    ///
+		///Template ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		public ElasticsearchResponse PutTemplate(string id, object body, Func requestParameters = null)
+		{
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_search/template/{0}".F(Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new PutTemplateRequestParameters());
+			}
+				
+
+
+			return ElasticsearchResponse.Wrap(this.DoRequest>(
+				"PUT", url, body, 
+				requestParameters: requestParams
+			));
+		}
+		
+		///Represents a PUT on /_search/template/{id}
+		///Returns: Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+	    ///
+		///Template ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		public Task> PutTemplateAsync(string id, object body, Func requestParameters = null)
+		{
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_search/template/{0}".F(Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new PutTemplateRequestParameters());
+			}
+				
+
+
+			return ElasticsearchResponse.WrapAsync(this.DoRequestAsync>(
+				"PUT", url, body, 
+				requestParameters: requestParams
+			));
+		}
+		
+		///Represents a POST on /_search/template/{id}
+		///Returns: ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+	    ///
+		///Template ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		public ElasticsearchResponse PutTemplatePost(string id, object body, Func requestParameters = null)
+		{
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_search/template/{0}".F(Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new PutTemplateRequestParameters());
+			}
+				
+
+
+			return this.DoRequest(
+				"POST", url, body, 
+				requestParameters: requestParams
+			);
+		}
+		
+		///Represents a POST on /_search/template/{id}
+		///Returns: A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+	    ///
+		///Template ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		public Task> PutTemplatePostAsync(string id, object body, Func requestParameters = null)
+		{
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_search/template/{0}".F(Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new PutTemplateRequestParameters());
+			}
+				
+
+
+			return this.DoRequestAsync(
+				"POST", url, body, 
+				requestParameters: requestParams
+			);
+		}
+		
+		///Represents a POST on /_search/template/{id}
+		///Returns: ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+	    ///
+		///Template ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		public ElasticsearchResponse PutTemplatePost(string id, object body, Func requestParameters = null)
+		{
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_search/template/{0}".F(Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new PutTemplateRequestParameters());
+			}
+				
+
+
+			return ElasticsearchResponse.Wrap(this.DoRequest>(
+				"POST", url, body, 
+				requestParameters: requestParams
+			));
+		}
+		
+		///Represents a POST on /_search/template/{id}
+		///Returns: Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+	    ///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+	    ///
+		///Template ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		public Task> PutTemplatePostAsync(string id, object body, Func requestParameters = null)
+		{
+			id.ThrowIfNullOrEmpty("id");
+			var url = "_search/template/{0}".F(Encoded(id));
+			IRequestParameters requestParams = null;
+				
+			if (requestParameters != null)
+			{
+				requestParams = requestParameters(new PutTemplateRequestParameters());
+			}
+				
+
+
+			return ElasticsearchResponse.WrapAsync(this.DoRequestAsync>(
+				"POST", url, body, 
+				requestParameters: requestParams
+			));
+		}
+		
 		///Represents a GET on /_search/scroll
 		///Returns: ElasticsearchResponse<T> holding the reponse body deserialized as T.
 		/// - If T is of type byte[] deserialization will be shortcircuited
diff --git a/src/Elasticsearch.Net/IElasticsearchClient.Generated.cs b/src/Elasticsearch.Net/IElasticsearchClient.Generated.cs
index 9122c685abf..38c3b6feceb 100644
--- a/src/Elasticsearch.Net/IElasticsearchClient.Generated.cs
+++ b/src/Elasticsearch.Net/IElasticsearchClient.Generated.cs
@@ -4072,6 +4072,162 @@ public interface IElasticsearchClient
 		
 		Task> DeleteByQueryAsync(string index, string type, object body, Func requestParameters = null);
 		
+		///Represents a DELETE on /_scripts/{lang}/{id}
+		///Returns: ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+		///
+		///Script language
+		///Script ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		
+		ElasticsearchResponse DeleteScript(string lang, string id, Func requestParameters = null);
+		
+		///Represents a DELETE on /_scripts/{lang}/{id}
+		///Returns: A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+		///
+		///Script language
+		///Script ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		
+		Task> DeleteScriptAsync(string lang, string id, Func requestParameters = null);
+		
+		///Represents a DELETE on /_scripts/{lang}/{id}
+		///Returns: ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+		///
+		///Script language
+		///Script ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		
+		ElasticsearchResponse DeleteScript(string lang, string id, Func requestParameters = null);
+		
+		///Represents a DELETE on /_scripts/{lang}/{id}
+		///Returns: Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+		///
+		///Script language
+		///Script ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		
+		Task> DeleteScriptAsync(string lang, string id, Func requestParameters = null);
+		
+		///Represents a DELETE on /_search/template/{id}
+		///Returns: ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+		///
+		///Template ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		
+		ElasticsearchResponse DeleteTemplate(string id, Func requestParameters = null);
+		
+		///Represents a DELETE on /_search/template/{id}
+		///Returns: A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+		///
+		///Template ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		
+		Task> DeleteTemplateAsync(string id, Func requestParameters = null);
+		
+		///Represents a DELETE on /_search/template/{id}
+		///Returns: ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+		///
+		///Template ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		
+		ElasticsearchResponse DeleteTemplate(string id, Func requestParameters = null);
+		
+		///Represents a DELETE on /_search/template/{id}
+		///Returns: Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+		///
+		///Template ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		
+		Task> DeleteTemplateAsync(string id, Func requestParameters = null);
+		
 		///Represents a HEAD on /{index}/{type}/{id}
 		///Returns: ElasticsearchResponse<T> holding the reponse body deserialized as T.
 		/// - If T is of type byte[] deserialization will be shortcircuited
@@ -4412,6 +4568,86 @@ public interface IElasticsearchClient
 		
 		Task> GetAsync(string index, string type, string id, Func requestParameters = null);
 		
+		///Represents a GET on /_scripts/{lang}/{id}
+		///Returns: ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+		///
+		///Script language
+		///Script ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		
+		ElasticsearchResponse GetScript(string lang, string id, Func requestParameters = null);
+		
+		///Represents a GET on /_scripts/{lang}/{id}
+		///Returns: A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+		///
+		///Script language
+		///Script ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		
+		Task> GetScriptAsync(string lang, string id, Func requestParameters = null);
+		
+		///Represents a GET on /_scripts/{lang}/{id}
+		///Returns: ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+		///
+		///Script language
+		///Script ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		
+		ElasticsearchResponse GetScript(string lang, string id, Func requestParameters = null);
+		
+		///Represents a GET on /_scripts/{lang}/{id}
+		///Returns: Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+		///
+		///Script language
+		///Script ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		
+		Task> GetScriptAsync(string lang, string id, Func requestParameters = null);
+		
 		///Represents a GET on /{index}/{type}/{id}/_source
 		///Returns: ElasticsearchResponse<T> holding the reponse body deserialized as T.
 		/// - If T is of type byte[] deserialization will be shortcircuited
@@ -4496,6 +4732,82 @@ public interface IElasticsearchClient
 		
 		Task> GetSourceAsync(string index, string type, string id, Func requestParameters = null);
 		
+		///Represents a GET on /_search/template/{id}
+		///Returns: ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+		///
+		///Template ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		
+		ElasticsearchResponse GetTemplate(string id, Func requestParameters = null);
+		
+		///Represents a GET on /_search/template/{id}
+		///Returns: A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+		///
+		///Template ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		
+		Task> GetTemplateAsync(string id, Func requestParameters = null);
+		
+		///Represents a GET on /_search/template/{id}
+		///Returns: ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+		///
+		///Template ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		
+		ElasticsearchResponse GetTemplate(string id, Func requestParameters = null);
+		
+		///Represents a GET on /_search/template/{id}
+		///Returns: Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+		///
+		///Template ID
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		
+		Task> GetTemplateAsync(string id, Func requestParameters = null);
+		
 		///Represents a POST on /{index}/{type}
 		///Returns: ElasticsearchResponse<T> holding the reponse body deserialized as T.
 		/// - If T is of type byte[] deserialization will be shortcircuited
@@ -16156,6 +16468,334 @@ public interface IElasticsearchClient
 		
 		Task> PingAsync(Func requestParameters = null);
 		
+		///Represents a PUT on /_scripts/{lang}/{id}
+		///Returns: ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+		///
+		///Script language
+		///Script ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		
+		ElasticsearchResponse PutScript(string lang, string id, object body, Func requestParameters = null);
+		
+		///Represents a PUT on /_scripts/{lang}/{id}
+		///Returns: A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+		///
+		///Script language
+		///Script ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		
+		Task> PutScriptAsync(string lang, string id, object body, Func requestParameters = null);
+		
+		///Represents a PUT on /_scripts/{lang}/{id}
+		///Returns: ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+		///
+		///Script language
+		///Script ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		
+		ElasticsearchResponse PutScript(string lang, string id, object body, Func requestParameters = null);
+		
+		///Represents a PUT on /_scripts/{lang}/{id}
+		///Returns: Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+		///
+		///Script language
+		///Script ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		
+		Task> PutScriptAsync(string lang, string id, object body, Func requestParameters = null);
+		
+		///Represents a POST on /_scripts/{lang}/{id}
+		///Returns: ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+		///
+		///Script language
+		///Script ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		
+		ElasticsearchResponse PutScriptPost(string lang, string id, object body, Func requestParameters = null);
+		
+		///Represents a POST on /_scripts/{lang}/{id}
+		///Returns: A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+		///
+		///Script language
+		///Script ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		
+		Task> PutScriptPostAsync(string lang, string id, object body, Func requestParameters = null);
+		
+		///Represents a POST on /_scripts/{lang}/{id}
+		///Returns: ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+		///
+		///Script language
+		///Script ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		
+		ElasticsearchResponse PutScriptPost(string lang, string id, object body, Func requestParameters = null);
+		
+		///Represents a POST on /_scripts/{lang}/{id}
+		///Returns: Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html	
+		///
+		///Script language
+		///Script ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		
+		Task> PutScriptPostAsync(string lang, string id, object body, Func requestParameters = null);
+		
+		///Represents a PUT on /_search/template/{id}
+		///Returns: ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+		///
+		///Template ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		
+		ElasticsearchResponse PutTemplate(string id, object body, Func requestParameters = null);
+		
+		///Represents a PUT on /_search/template/{id}
+		///Returns: A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+		///
+		///Template ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		
+		Task> PutTemplateAsync(string id, object body, Func requestParameters = null);
+		
+		///Represents a PUT on /_search/template/{id}
+		///Returns: ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+		///
+		///Template ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		
+		ElasticsearchResponse PutTemplate(string id, object body, Func requestParameters = null);
+		
+		///Represents a PUT on /_search/template/{id}
+		///Returns: Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+		///
+		///Template ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		
+		Task> PutTemplateAsync(string id, object body, Func requestParameters = null);
+		
+		///Represents a POST on /_search/template/{id}
+		///Returns: ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+		///
+		///Template ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		
+		ElasticsearchResponse PutTemplatePost(string id, object body, Func requestParameters = null);
+		
+		///Represents a POST on /_search/template/{id}
+		///Returns: A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+		///
+		///Template ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///A task that'll return an ElasticsearchResponse<T> holding the reponse body deserialized as T.
+		/// - If T is of type byte[] deserialization will be shortcircuited
+		/// - If T is of type VoidResponse the response stream will be ignored completely
+		///
+		
+		Task> PutTemplatePostAsync(string id, object body, Func requestParameters = null);
+		
+		///Represents a POST on /_search/template/{id}
+		///Returns: ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+		///
+		///Template ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///ElasticsearchResponse<T> holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		
+		ElasticsearchResponse PutTemplatePost(string id, object body, Func requestParameters = null);
+		
+		///Represents a POST on /_search/template/{id}
+		///Returns: Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///See also: http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html	
+		///
+		///Template ID
+		///The document
+		///
+		///Optional function to specify any additional request parameters 
+		///Querystring values, connection configuration specific to this request, deserialization state.
+		///
+		///Task that'll return an ElasticsearchResponse<T$gt; holding the response body deserialized as DynamicDictionary
+		/// - Dynamic dictionary is a special dynamic type that allows json to be traversed safely
+		/// - i.e result.Response.hits.hits[0].property.nested["nested_deeper"]
+		/// - can be safely dispatched to a nullable type even if intermediate properties do not exist
+		///
+		
+		Task> PutTemplatePostAsync(string id, object body, Func requestParameters = null);
+		
 		///Represents a GET on /_search/scroll
 		///Returns: ElasticsearchResponse<T> holding the reponse body deserialized as T.
 		/// - If T is of type byte[] deserialization will be shortcircuited
diff --git a/src/Nest/DSL/DeleteSearchTemplateDescriptor.cs b/src/Nest/DSL/DeleteSearchTemplateDescriptor.cs
new file mode 100644
index 00000000000..03a5d4757a9
--- /dev/null
+++ b/src/Nest/DSL/DeleteSearchTemplateDescriptor.cs
@@ -0,0 +1,44 @@
+using Elasticsearch.Net;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Nest
+{
+	[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
+	public interface IDeleteSearchTemplateRequest : INamePath { }
+
+	public partial class DeleteSearchTemplateRequest 
+		: NamePathBase, IDeleteSearchTemplateRequest
+	{
+		public DeleteSearchTemplateRequest(string templateName)
+			: base(templateName)
+		{
+		}
+
+		protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo pathInfo)
+		{
+			DeleteSearchTemplatePathInfo.Update(pathInfo, this);
+		}
+	}
+
+	internal static class DeleteSearchTemplatePathInfo
+	{
+		public static void Update(ElasticsearchPathInfo pathInfo, IDeleteSearchTemplateRequest request)
+		{
+			pathInfo.Id = request.Name;
+			pathInfo.HttpMethod = PathInfoHttpMethod.DELETE;
+		}
+	}
+
+	public partial class DeleteSearchTemplateDescriptor 
+		: NamePathDescriptor, IDeleteSearchTemplateRequest
+	{
+		protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo pathInfo)
+		{
+			DeleteSearchTemplatePathInfo.Update(pathInfo, this);
+		}
+	}
+}
diff --git a/src/Nest/DSL/GetSearchTemplateDescriptor.cs b/src/Nest/DSL/GetSearchTemplateDescriptor.cs
new file mode 100644
index 00000000000..dd54f9a127a
--- /dev/null
+++ b/src/Nest/DSL/GetSearchTemplateDescriptor.cs
@@ -0,0 +1,46 @@
+using Elasticsearch.Net;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Nest
+{
+	[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
+	public interface IGetSearchTemplateRequest : INamePath
+	{
+	}
+
+	public partial class GetSearchTemplateRequest 
+		: NamePathBase, IGetSearchTemplateRequest
+	{
+		public GetSearchTemplateRequest(string templateName)
+			: base(templateName)
+		{
+		}
+
+		protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo pathInfo)
+		{
+			GetSearchTemplatePathInfo.Update(pathInfo, this);
+		}
+	}
+
+	internal static class GetSearchTemplatePathInfo
+	{
+		public static void Update(ElasticsearchPathInfo pathInfo, IGetSearchTemplateRequest request)
+		{
+			pathInfo.Id = request.Name;
+			pathInfo.HttpMethod = PathInfoHttpMethod.GET;
+		}
+	}
+
+	public partial class GetSearchTemplateDescriptor 
+		: NamePathDescriptor, IGetSearchTemplateRequest
+	{
+		protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo pathInfo)
+		{
+			GetSearchTemplatePathInfo.Update(pathInfo, this);
+		}
+	}
+}
diff --git a/src/Nest/DSL/PutSearchTemplateDescriptor.cs b/src/Nest/DSL/PutSearchTemplateDescriptor.cs
new file mode 100644
index 00000000000..60c459fd0d8
--- /dev/null
+++ b/src/Nest/DSL/PutSearchTemplateDescriptor.cs
@@ -0,0 +1,59 @@
+using Elasticsearch.Net;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Nest
+{
+	[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
+	public interface IPutSearchTemplateRequest : INamePath
+	{
+		[JsonProperty("template")]
+		string Template { get; set; }
+	}
+
+	public partial class PutSearchTemplateRequest : NamePathBase, IPutSearchTemplateRequest
+	{
+		public string Template { get; set; }
+
+		public PutSearchTemplateRequest(string templateName)
+			: base(templateName)
+		{
+		}
+
+		protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo pathInfo)
+		{
+			PutSearchTemplatePathInfo.Update(pathInfo, this);
+		}
+	}
+
+	internal static class PutSearchTemplatePathInfo
+	{
+		public static void Update(ElasticsearchPathInfo pathInfo, IPutSearchTemplateRequest request)
+		{
+			pathInfo.Id = request.Name;
+			pathInfo.HttpMethod = PathInfoHttpMethod.POST;
+		}
+	}
+
+	[DescriptorFor("SearchTemplatePut")]
+	public partial class PutSearchTemplateDescriptor
+		: NamePathDescriptor, IPutSearchTemplateRequest
+	{
+		IPutSearchTemplateRequest Self { get { return this; } }
+		string IPutSearchTemplateRequest.Template { get; set;}
+
+		public PutSearchTemplateDescriptor Template(string template)
+		{
+			this.Self.Template = template;
+			return this;
+		}
+
+		protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo pathInfo)
+		{
+			PutSearchTemplatePathInfo.Update(pathInfo, this);
+		}
+	}
+}
diff --git a/src/Nest/DSL/Query/IQueryContainer.cs b/src/Nest/DSL/Query/IQueryContainer.cs
index d5becbc8510..27605e2ee06 100644
--- a/src/Nest/DSL/Query/IQueryContainer.cs
+++ b/src/Nest/DSL/Query/IQueryContainer.cs
@@ -140,6 +140,9 @@ public interface IQueryContainer : ICustomJson
 		[JsonProperty(PropertyName = "function_score")]
 		IFunctionScoreQuery FunctionScore { get; set; }
 
+		[JsonProperty(PropertyName = "template")]
+		ITemplateQuery Template { get; set; }
+
 		void Accept(IQueryVisitor visitor);
 	}
 }
\ No newline at end of file
diff --git a/src/Nest/DSL/Query/QueryContainer.cs b/src/Nest/DSL/Query/QueryContainer.cs
index df938fa5ff7..9baf14d70ef 100644
--- a/src/Nest/DSL/Query/QueryContainer.cs
+++ b/src/Nest/DSL/Query/QueryContainer.cs
@@ -86,6 +86,8 @@ public class QueryContainer : IQueryContainer
 		IIndicesQuery IQueryContainer.Indices { get; set; }
 
 		IFunctionScoreQuery IQueryContainer.FunctionScore { get; set; }
+
+		ITemplateQuery IQueryContainer.Template { get; set; }
 		
 		public QueryContainer() {}
 		
diff --git a/src/Nest/DSL/Query/QueryDescriptor.cs b/src/Nest/DSL/Query/QueryDescriptor.cs
index 1b998f9ad37..ab5f39793f9 100644
--- a/src/Nest/DSL/Query/QueryDescriptor.cs
+++ b/src/Nest/DSL/Query/QueryDescriptor.cs
@@ -854,5 +854,12 @@ public QueryContainer FunctionScore(Action> func
 			return this.New(query, q => q.FunctionScore = query);
 
 		}
+
+		public QueryContainer Template(Action selector)
+		{
+			var query = new TemplateQueryDescriptor();
+			selector(query);
+			return this.New(query, q => q.Template = query);
+		}
 	}
 }
diff --git a/src/Nest/DSL/Query/TemplateQueryDescriptor.cs b/src/Nest/DSL/Query/TemplateQueryDescriptor.cs
new file mode 100644
index 00000000000..6635d33c2bb
--- /dev/null
+++ b/src/Nest/DSL/Query/TemplateQueryDescriptor.cs
@@ -0,0 +1,66 @@
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Nest
+{
+	[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
+	public interface ITemplateQuery : IQuery
+	{
+		[JsonProperty("query")]
+		string Query { get; set; }
+
+		[JsonProperty("params")]
+		IDictionary Params { get; set; } 
+	}
+
+	public class TemplateQuery : PlainQuery, ITemplateQuery
+	{
+		protected override void WrapInContainer(IQueryContainer container)
+		{
+			container.Template = this;
+		}
+
+		public string Query { get; set; }
+
+		public IDictionary Params { get; set;}
+
+		public bool IsConditionless
+		{
+			get { return this.Query.IsNullOrEmpty(); }
+		}
+	}
+
+	public class TemplateQueryDescriptor : ITemplateQuery
+	{
+		ITemplateQuery Self { get { return this; } }
+
+		string ITemplateQuery.Query { get; set; }
+
+		IDictionary ITemplateQuery.Params { get; set; }
+
+		bool IQuery.IsConditionless { get { return this.Self.Query.IsNullOrEmpty(); } }
+
+		public TemplateQueryDescriptor Query(string query)
+		{
+			this.Self.Query = query;
+			return this;
+		}
+
+		public TemplateQueryDescriptor Params(IDictionary paramsDictionary)
+		{
+			paramsDictionary.ThrowIfNull("paramsDictionary");
+			this.Self.Params = paramsDictionary;
+			return this;
+		}
+
+		public TemplateQueryDescriptor Params(Func, FluentDictionary> paramsDictionary)
+		{
+			paramsDictionary.ThrowIfNull("paramsDictionary");
+			this.Self.Params = paramsDictionary(new FluentDictionary());
+			return this;
+		}
+	}
+}
diff --git a/src/Nest/DSL/SearchTemplateDescriptor.cs b/src/Nest/DSL/SearchTemplateDescriptor.cs
new file mode 100644
index 00000000000..791edbc1f65
--- /dev/null
+++ b/src/Nest/DSL/SearchTemplateDescriptor.cs
@@ -0,0 +1,170 @@
+using Elasticsearch.Net;
+using Nest.DSL.Descriptors;
+using Nest.Resolvers.Converters;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Linq.Expressions;
+using System.Text;
+
+namespace Nest
+{
+	internal static class SearchTemplatePathInfo
+	{
+		public static void Update(ElasticsearchPathInfo pathInfo)
+		{
+			pathInfo.HttpMethod = PathInfoHttpMethod.POST;
+		}
+
+		/// 
+		/// Based on the type information present in this descriptor create method that takes
+		/// the returned _source and hit and returns the ClrType it should deserialize too.
+		/// This is so that Documents[A] can contain actual instances of subclasses B, C as well.
+		/// If you specify types using .Types(typeof(B), typeof(C)) then NEST can automagically
+		/// create a TypeSelector based on the hits _type property.
+		/// 
+		public static void CloseOverAutomagicCovariantResultSelector(ElasticInferrer infer, ISearchTemplateRequest self)
+		{
+			if (infer == null || self == null) return;
+			var returnType = self.ClrType;
+
+			if (returnType == null) return;
+
+			var types = (self.Types ?? Enumerable.Empty()).Where(t => t.Type != null).ToList();
+			if (self.TypeSelector != null || !types.HasAny(t => t.Type != returnType))
+				return;
+
+			var typeDictionary = types.ToDictionary(infer.TypeName, t => t.Type);
+			self.TypeSelector = (o, h) =>
+			{
+				Type t;
+				return !typeDictionary.TryGetValue(h.Type, out t) ? returnType : t;
+			};
+		}
+	}
+
+	[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
+	public interface ISearchTemplateRequest 
+		: IQueryPath
+	{
+		[JsonProperty("params")]
+		IDictionary Params { get; set; }
+
+		Type ClrType { get; }
+
+		[JsonProperty(PropertyName = "template")]
+		string Template { get; set; }
+
+		[JsonProperty("file")]
+		string File { get; set; }
+
+		[JsonProperty("id")]
+		string Id { get; set; }
+
+		Func, Type> TypeSelector { get; set; }
+	}
+
+	public interface ISearchTemplateRequest : ISearchTemplateRequest { }
+
+	public partial class SearchTemplateRequest 
+		: QueryPathBase, ISearchTemplateRequest
+	{
+		public string Template { get; set; }
+		public string File { get; set; }
+		public string Id { get; set; }
+		public IDictionary Params { get; set; }
+		private Type _clrType { get; set; }
+		Type ISearchTemplateRequest.ClrType { get { return _clrType; } }
+		public Func, Type> TypeSelector { get; set; }
+
+		protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo pathInfo)
+		{
+			SearchTemplatePathInfo.Update(pathInfo);
+		}
+	}
+	
+	public partial class SearchTemplateRequest 
+		: QueryPathBase, ISearchTemplateRequest
+		where T : class
+	{
+		public string Template { get; set; }
+		public string File { get; set; }
+		public string Id { get; set; }
+		public IDictionary Params { get; set; }
+		public Type ClrType { get { return typeof(T); } }
+		public Func, Type> TypeSelector { get; set; }
+
+		protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo pathInfo)
+		{
+			SearchTemplatePathInfo.Update(pathInfo);
+		}
+	}
+
+	public partial class SearchTemplateDescriptor 
+		: QueryPathDescriptorBase, SearchTemplateRequestParameters, T>, ISearchTemplateRequest
+		where T : class
+	{
+		ISearchTemplateRequest Self { get { return this; } }
+
+		Type ISearchTemplateRequest.ClrType { get { return typeof(T); } }
+
+		/// 
+		/// Whether conditionless queries are allowed or not
+		/// 
+		internal bool _Strict { get; set; }
+
+		string ISearchTemplateRequest.Template { get; set; }
+
+		string ISearchTemplateRequest.File { get; set; }
+
+		string ISearchTemplateRequest.Id { get; set; }
+
+		IDictionary ISearchTemplateRequest.Params { get; set; }
+
+		Func, Type> ISearchTemplateRequest.TypeSelector { get; set; }
+
+		public SearchTemplateDescriptor Template(string template)
+		{
+			this.Self.Template = template;
+			return this;
+		}
+
+		public SearchTemplateDescriptor File(string file)
+		{
+			this.Self.File = file;
+			return this;
+		}
+
+		public SearchTemplateDescriptor Id(string id)
+		{
+			this.Self.Id = id;
+			return this;
+		}
+
+		public SearchTemplateDescriptor Params(Dictionary paramDictionary)
+		{
+			paramDictionary.ThrowIfNull("paramDictionary");
+			this.Self.Params = paramDictionary;
+			return this;
+		}
+
+		public SearchTemplateDescriptor Params(Func, FluentDictionary> paramDictionary)
+		{
+			paramDictionary.ThrowIfNull("paramDictionary");
+			this.Self.Params = paramDictionary(new FluentDictionary());
+			return this;
+		}
+
+		public SearchTemplateDescriptor ConcreteTypeSelector(Func, Type> typeSelector)
+		{
+			Self.TypeSelector = typeSelector;
+			return this;
+		}
+
+		protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo pathInfo)
+		{
+			SearchTemplatePathInfo.Update(pathInfo);
+		}
+	}
+}
diff --git a/src/Nest/DSL/Termplates/CreateWarmerDescriptor.cs b/src/Nest/DSL/Warmers/CreateWarmerDescriptor.cs
similarity index 100%
rename from src/Nest/DSL/Termplates/CreateWarmerDescriptor.cs
rename to src/Nest/DSL/Warmers/CreateWarmerDescriptor.cs
diff --git a/src/Nest/DSL/_Descriptors.generated.cs b/src/Nest/DSL/_Descriptors.generated.cs
index 6d38d281adf..8faa5078a5e 100644
--- a/src/Nest/DSL/_Descriptors.generated.cs
+++ b/src/Nest/DSL/_Descriptors.generated.cs
@@ -1514,6 +1514,38 @@ public DeleteByQueryDescriptor Timeout(string timeout)
 		}
 		
 	
+	}
+	
+	
+	///descriptor for DeleteScript
+	///
+	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html
+	///
+ ///
+ public partial class DeleteScriptDescriptor : BaseRequest + { + + + + protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo pathInfo) + { + throw new NotImplementedException(); + } + + + } + + + ///descriptor for DeleteTemplate + ///
+	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html
+	///
+ ///
+ public partial class DeleteTemplateDescriptor + { + + + } @@ -1888,6 +1920,25 @@ public GetDescriptor VersionType(VersionType version_type) } + ///descriptor for GetScript + ///
+	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html
+	///
+ ///
+ public partial class GetScriptDescriptor : BaseRequest + { + + + + protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo pathInfo) + { + throw new NotImplementedException(); + } + + + } + + ///descriptor for GetSource ///
 	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-get.html
@@ -2009,6 +2060,19 @@ public SourceDescriptor VersionType(VersionType version_type)
 		}
 		
 	
+	}
+	
+	
+	///descriptor for GetTemplate
+	///
+	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html
+	///
+ ///
+ public partial class GetTemplateDescriptor + { + + + } @@ -2494,35 +2558,6 @@ public DeleteMappingDescriptor MasterTimeout(string master_timeout) } - ///descriptor for IndicesDeleteTemplateForAll - ///
-	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-templates.html
-	///
- ///
- public partial class DeleteTemplateDescriptor - { - - - - ///Explicit operation timeout - public DeleteTemplateDescriptor Timeout(string timeout) - { - this.Request.RequestParameters.Timeout(timeout); - return this; - } - - - ///Specify timeout for connection to master - public DeleteTemplateDescriptor MasterTimeout(string master_timeout) - { - this.Request.RequestParameters.MasterTimeout(master_timeout); - return this; - } - - - } - - ///descriptor for IndicesDeleteWarmer ///
 	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-warmers.html
@@ -2978,35 +3013,6 @@ public GetIndexSettingsDescriptor Local(bool local = true)
 	}
 	
 	
-	///descriptor for IndicesGetTemplateForAll
-	///
-	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-templates.html
-	///
- ///
- public partial class GetTemplateDescriptor - { - - - - ///Return settings in flat format (default: false) - public GetTemplateDescriptor FlatSettings(bool flat_settings = true) - { - this.Request.RequestParameters.FlatSettings(flat_settings); - return this; - } - - - ///Return local information, do not retrieve the state from master node (default: false) - public GetTemplateDescriptor Local(bool local = true) - { - this.Request.RequestParameters.Local(local); - return this; - } - - - } - - ///descriptor for IndicesGetWarmerForAll ///
 	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-warmers.html
@@ -3349,6 +3355,14 @@ public partial class PutTemplateDescriptor
 		
 	
 
+		///Whether the index template should only be added if new or can also replace an existing one
+		public PutTemplateDescriptor Create(bool create = true)
+		{
+			this.Request.RequestParameters.Create(create);
+			return this;
+		}
+		
+
 		///Explicit operation timeout
 		public PutTemplateDescriptor Timeout(string timeout)
 		{
@@ -3638,7 +3652,7 @@ public IndicesStatsDescriptor Fields(params Expression>[] typ
 			
 
 		///A comma-separated list of search groups for `search` index metric
-		public IndicesStatsDescriptor Groups(bool groups = true)
+		public IndicesStatsDescriptor Groups(params string[] groups)
 		{
 			this.Request.RequestParameters.Groups(groups);
 			return this;
@@ -4604,6 +4618,25 @@ public partial class PingDescriptor
 		
 	
 	
+	}
+	
+	
+	///descriptor for PutScript
+	///
+	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html
+	///
+ ///
+ public partial class PutScriptDescriptor : BaseRequest + { + + + + protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo pathInfo) + { + throw new NotImplementedException(); + } + + } @@ -4858,13 +4891,13 @@ protected override void UpdatePathInfo(IConnectionSettingsValues settings, Elast ///http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-template.html ///
///
- public partial class SearchTemplateDescriptor : BaseRequest + public partial class SearchTemplateDescriptor { ///Whether specified concrete indices should be ignored when unavailable (missing or closed) - public SearchTemplateDescriptor IgnoreUnavailable(bool ignore_unavailable = true) + public SearchTemplateDescriptor IgnoreUnavailable(bool ignore_unavailable = true) { this.Request.RequestParameters.IgnoreUnavailable(ignore_unavailable); return this; @@ -4872,7 +4905,7 @@ public SearchTemplateDescriptor IgnoreUnavailable(bool ignore_unavailable = true ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - public SearchTemplateDescriptor AllowNoIndices(bool allow_no_indices = true) + public SearchTemplateDescriptor AllowNoIndices(bool allow_no_indices = true) { this.Request.RequestParameters.AllowNoIndices(allow_no_indices); return this; @@ -4880,7 +4913,7 @@ public SearchTemplateDescriptor AllowNoIndices(bool allow_no_indices = true) ///Whether to expand wildcard expression to concrete indices that are open, closed or both. - public SearchTemplateDescriptor ExpandWildcards(ExpandWildcards expand_wildcards) + public SearchTemplateDescriptor ExpandWildcards(ExpandWildcards expand_wildcards) { this.Request.RequestParameters.ExpandWildcards(expand_wildcards); return this; @@ -4888,7 +4921,7 @@ public SearchTemplateDescriptor ExpandWildcards(ExpandWildcards expand_wildcards ///Specify the node or shard the operation should be performed on (default: random) - public SearchTemplateDescriptor Preference(string preference) + public SearchTemplateDescriptor Preference(string preference) { this.Request.RequestParameters.Preference(preference); return this; @@ -4896,7 +4929,7 @@ public SearchTemplateDescriptor Preference(string preference) ///A comma-separated list of specific routing values - public SearchTemplateDescriptor Routing(params string[] routing) + public SearchTemplateDescriptor Routing(params string[] routing) { this.Request.RequestParameters.Routing(routing); return this; @@ -4904,7 +4937,7 @@ public SearchTemplateDescriptor Routing(params string[] routing) ///Specify how long a consistent view of the index should be maintained for scrolled search - public SearchTemplateDescriptor Scroll(string scroll) + public SearchTemplateDescriptor Scroll(string scroll) { this.Request.RequestParameters.Scroll(scroll); return this; @@ -4912,18 +4945,12 @@ public SearchTemplateDescriptor Scroll(string scroll) ///Search operation type - public SearchTemplateDescriptor SearchType(SearchType search_type) + public SearchTemplateDescriptor SearchType(SearchType search_type) { this.Request.RequestParameters.SearchType(search_type); return this; } - - protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo pathInfo) - { - throw new NotImplementedException(); - } - } diff --git a/src/Nest/DSL/_Requests.generated.cs b/src/Nest/DSL/_Requests.generated.cs index bafcba1be34..41eb2a224d2 100644 --- a/src/Nest/DSL/_Requests.generated.cs +++ b/src/Nest/DSL/_Requests.generated.cs @@ -1424,6 +1424,32 @@ public string Timeout } + ///Request parameters for DeleteScript + ///
+	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html
+	///
+ ///
+ public partial class DeleteScriptRequest : BasePathRequest + { + + protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo pathInfo) + { + throw new NotImplementedException(); + } + + } + + + ///Request parameters for DeleteTemplate + ///
+	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html
+	///
+ ///
+ public partial class DeleteTemplateRequest + { + } + + ///Request parameters for Exists ///
 	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-get.html
@@ -1720,6 +1746,22 @@ public VersionType VersionType
 	}
 	
 		
+	///Request parameters for GetScript
+	///
+	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html
+	///
+ ///
+ public partial class GetScriptRequest : BasePathRequest + { + + protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo pathInfo) + { + throw new NotImplementedException(); + } + + } + + ///Request parameters for GetSource ///
 	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-get.html
@@ -1819,6 +1861,16 @@ public VersionType VersionType
 	}
 	
 		
+	///Request parameters for GetTemplate
+	///
+	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html
+	///
+ ///
+ public partial class GetTemplateRequest + { + } + + ///Request parameters for Index ///
 	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-index_.html
@@ -2257,32 +2309,6 @@ public string MasterTimeout
 	}
 	
 		
-	///Request parameters for IndicesDeleteTemplateForAll
-	///
-	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-templates.html
-	///
- ///
- public partial class DeleteTemplateRequest - { - - ///Explicit operation timeout - public string Timeout - { - get { return this.Request.RequestParameters.GetQueryStringValue("timeout"); } - set { this.Request.RequestParameters.AddQueryString("timeout", value); } - } - - - ///Specify timeout for connection to master - public string MasterTimeout - { - get { return this.Request.RequestParameters.GetQueryStringValue("master_timeout"); } - set { this.Request.RequestParameters.AddQueryString("master_timeout", value); } - } - - } - - ///Request parameters for IndicesDeleteWarmer ///
 	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-warmers.html
@@ -2705,32 +2731,6 @@ public bool Local
 	}
 	
 		
-	///Request parameters for IndicesGetTemplateForAll
-	///
-	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-templates.html
-	///
- ///
- public partial class GetTemplateRequest - { - - ///Return settings in flat format (default: false) - public bool FlatSettings - { - get { return this.Request.RequestParameters.GetQueryStringValue("flat_settings"); } - set { this.Request.RequestParameters.AddQueryString("flat_settings", value); } - } - - - ///Return local information, do not retrieve the state from master node (default: false) - public bool Local - { - get { return this.Request.RequestParameters.GetQueryStringValue("local"); } - set { this.Request.RequestParameters.AddQueryString("local", value); } - } - - } - - ///Request parameters for IndicesGetWarmerForAll ///
 	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-warmers.html
@@ -3053,6 +3053,14 @@ public bool FlatSettings
 	public partial class PutTemplateRequest 
 			{
 		
+		///Whether the index template should only be added if new or can also replace an existing one
+		public bool Create 
+		{ 
+			get { return this.Request.RequestParameters.GetQueryStringValue("create"); } 
+			set { this.Request.RequestParameters.AddQueryString("create", value); }
+		}
+		
+		
 		///Explicit operation timeout
 		public string Timeout 
 		{ 
@@ -3294,9 +3302,9 @@ public IList Fields
 		
 		
 		///A comma-separated list of search groups for `search` index metric
-		public bool Groups 
+		public  string[] Groups 
 		{ 
-			get { return this.Request.RequestParameters.GetQueryStringValue("groups"); } 
+			get { return this.Request.RequestParameters.GetQueryStringValue< string[]>("groups"); } 
 			set { this.Request.RequestParameters.AddQueryString("groups", value); }
 		}
 		
@@ -4126,6 +4134,22 @@ public partial class PingRequest
 	}
 	
 		
+	///Request parameters for PutScript
+	///
+	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html
+	///
+ ///
+ public partial class PutScriptRequest : BasePathRequest + { + + protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo pathInfo) + { + throw new NotImplementedException(); + } + + } + + ///Request parameters for ScrollGet ///
 	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-request-scroll.html
@@ -4359,7 +4383,7 @@ protected override void UpdatePathInfo(IConnectionSettingsValues settings, Elast
 	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-template.html
 	///
///
- public partial class SearchTemplateRequest : BasePathRequest + public partial class SearchTemplateRequest { ///Whether specified concrete indices should be ignored when unavailable (missing or closed) @@ -4417,12 +4441,6 @@ public SearchType SearchType set { this.Request.RequestParameters.AddQueryString("search_type", value); } } - - protected override void UpdatePathInfo(IConnectionSettingsValues settings, ElasticsearchPathInfo pathInfo) - { - throw new NotImplementedException(); - } - } @@ -6067,6 +6085,72 @@ public string SuggestText } + ///Request parameters for SearchTemplateGet + ///
+	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-template.html
+	///
+ ///
+ public partial class SearchTemplateRequest + { + + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + public bool IgnoreUnavailable + { + get { return this.Request.RequestParameters.GetQueryStringValue("ignore_unavailable"); } + set { this.Request.RequestParameters.AddQueryString("ignore_unavailable", value); } + } + + + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + public bool AllowNoIndices + { + get { return this.Request.RequestParameters.GetQueryStringValue("allow_no_indices"); } + set { this.Request.RequestParameters.AddQueryString("allow_no_indices", value); } + } + + + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + public ExpandWildcards ExpandWildcards + { + get { return this.Request.RequestParameters.GetQueryStringValue("expand_wildcards"); } + set { this.Request.RequestParameters.AddQueryString("expand_wildcards", value); } + } + + + ///Specify the node or shard the operation should be performed on (default: random) + public string Preference + { + get { return this.Request.RequestParameters.GetQueryStringValue("preference"); } + set { this.Request.RequestParameters.AddQueryString("preference", value); } + } + + + ///A comma-separated list of specific routing values + public string[] Routing + { + get { return this.Request.RequestParameters.GetQueryStringValue< string[]>("routing"); } + set { this.Request.RequestParameters.AddQueryString("routing", value); } + } + + + ///Specify how long a consistent view of the index should be maintained for scrolled search + public string Scroll + { + get { return this.Request.RequestParameters.GetQueryStringValue("scroll"); } + set { this.Request.RequestParameters.AddQueryString("scroll", value); } + } + + + ///Search operation type + public SearchType SearchType + { + get { return this.Request.RequestParameters.GetQueryStringValue("search_type"); } + set { this.Request.RequestParameters.AddQueryString("search_type", value); } + } + + } + + ///Request parameters for TermvectorGet ///
 	///http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-termvectors.html
diff --git a/src/Nest/Domain/Paths/ElasticSearchPathInfo.cs b/src/Nest/Domain/Paths/ElasticSearchPathInfo.cs
index 476a00632c1..0f011f6dfbc 100644
--- a/src/Nest/Domain/Paths/ElasticSearchPathInfo.cs
+++ b/src/Nest/Domain/Paths/ElasticSearchPathInfo.cs
@@ -25,6 +25,8 @@ public class ElasticsearchPathInfo : IElasticsearchPathInfo
 		public string Metric { get; set; }
 		public string IndexMetric { get; set; }
 
+		public string Lang { get; set; }
+
 		public ElasticsearchPathInfo()
 		{
 			this.RequestParameters = new TParameters();
diff --git a/src/Nest/Domain/Responses/DeleteSearchTemplateResponse.cs b/src/Nest/Domain/Responses/DeleteSearchTemplateResponse.cs
new file mode 100644
index 00000000000..c7210765672
--- /dev/null
+++ b/src/Nest/Domain/Responses/DeleteSearchTemplateResponse.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Nest
+{
+	public interface IDeleteSearchTemplateResponse : IResponse
+	{
+	}
+
+	public class DeleteSearchTemplateResponse : BaseResponse, IDeleteSearchTemplateResponse
+	{
+	}
+}
diff --git a/src/Nest/Domain/Responses/GetSearchTemplateResponse.cs b/src/Nest/Domain/Responses/GetSearchTemplateResponse.cs
new file mode 100644
index 00000000000..a0cbd19b29c
--- /dev/null
+++ b/src/Nest/Domain/Responses/GetSearchTemplateResponse.cs
@@ -0,0 +1,20 @@
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Nest
+{
+	public interface IGetSearchTemplateResponse : IResponse
+	{
+		string Template { get; set; }
+	}
+
+	[JsonObject]
+	public class GetSearchTemplateResponse : BaseResponse, IGetSearchTemplateResponse
+	{
+		[JsonProperty("template")]
+		public string Template { get; set; }
+	}
+}
diff --git a/src/Nest/Domain/Responses/PutSearchTemplateResponse.cs b/src/Nest/Domain/Responses/PutSearchTemplateResponse.cs
new file mode 100644
index 00000000000..cc474c198a1
--- /dev/null
+++ b/src/Nest/Domain/Responses/PutSearchTemplateResponse.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Nest
+{
+	public interface IPutSearchTemplateResponse : IResponse
+	{
+
+	}
+
+	public class PutSearchTemplateResponse : BaseResponse, IPutSearchTemplateResponse
+	{
+	}
+}
diff --git a/src/Nest/ElasticClient-SearchTemplate.cs b/src/Nest/ElasticClient-SearchTemplate.cs
new file mode 100644
index 00000000000..aa10f70276b
--- /dev/null
+++ b/src/Nest/ElasticClient-SearchTemplate.cs
@@ -0,0 +1,237 @@
+using Elasticsearch.Net;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Nest
+{
+	public partial class ElasticClient
+	{
+		public ISearchResponse SearchTemplate(Func, SearchTemplateDescriptor> selector) where T : class
+		{
+			return this.SearchTemplate(selector);
+		}
+
+		public ISearchResponse SearchTemplate(Func, SearchTemplateDescriptor> selector)
+			where T : class
+			where TResult : class
+		{
+			selector.ThrowIfNull("searchSelector");
+			var descriptor = selector(new SearchTemplateDescriptor());
+
+			IPathInfo p = descriptor;
+			var pathInfo = p
+				.ToPathInfo(_connectionSettings)
+				.DeserializationState(this.CreateSearchDeserializer(descriptor));
+
+			var status = this.RawDispatch.SearchTemplateDispatch>(pathInfo, descriptor);
+			return status.Success ? status.Response : CreateInvalidInstance>(status);
+		}
+
+		public ISearchResponse SearchTemplate(ISearchTemplateRequest request) where T : class
+		{
+			return this.SearchTemplate(request);
+		}
+
+		public ISearchResponse SearchTemplate(ISearchTemplateRequest request)
+			where T : class
+			where TResult : class
+		{
+			var pathInfo = request
+				.ToPathInfo(_connectionSettings)
+				.DeserializationState(this.CreateSearchDeserializer(request));
+
+			var status = this.RawDispatch.SearchTemplateDispatch>(pathInfo, request);
+			return status.Success ? status.Response : CreateInvalidInstance>(status);
+		}
+
+		public Task> SearchTemplateAsync(Func, SearchTemplateDescriptor> selector) where T : class
+		{
+			return this.SearchTemplateAsync(selector);
+		}
+
+		public Task> SearchTemplateAsync(Func, SearchTemplateDescriptor> selector)
+			where T : class
+			where TResult : class
+		{
+			selector.ThrowIfNull("selector");
+			var descriptor = selector(new SearchTemplateDescriptor());
+
+			IPathInfo p = descriptor;
+			var pathInfo = p
+				.ToPathInfo(_connectionSettings)
+				.DeserializationState(CreateSearchDeserializer(descriptor));
+
+			return this.RawDispatch.SearchTemplateDispatchAsync>(pathInfo, descriptor)
+				.ContinueWith>(t =>
+				{
+					if (t.IsFaulted)
+						throw t.Exception.Flatten().InnerException;
+
+					return t.Result.Success
+						? t.Result.Response
+						: CreateInvalidInstance>(t.Result);
+				});
+		}
+
+		public Task> SearchTemplateAsync(ISearchTemplateRequest request) where T : class
+		{
+			return this.SearchTemplateAsync(request);
+		}
+
+		public Task> SearchTemplateAsync(ISearchTemplateRequest request)
+			where T : class
+			where TResult : class
+		{
+			var pathInfo = request
+				.ToPathInfo(_connectionSettings)
+				.DeserializationState(this.CreateSearchDeserializer(request));
+
+			return this.RawDispatch.SearchTemplateDispatchAsync>(pathInfo, request)
+				.ContinueWith>(t =>
+				{
+					if (t.IsFaulted)
+						throw t.Exception.Flatten().InnerException;
+
+					return t.Result.Success
+						? t.Result.Response
+						: CreateInvalidInstance>(t.Result);
+				});
+		}
+
+		public IGetSearchTemplateResponse GetSearchTemplate(string name, Func selector = null)
+		{
+			selector = selector ?? (s => s);
+			return this.Dispatch(
+				d => selector(d.Name(name)),
+				(p, d) => this.RawDispatch.GetTemplateDispatch(p, d)
+			);
+		}
+
+		public IGetSearchTemplateResponse GetSearchTemplate(IGetSearchTemplateRequest request)
+		{
+			return this.Dispatch(
+				request,
+				(p, d) => this.RawDispatch.GetTemplateDispatch(p, d)
+			);
+		}
+
+		public Task GetSearchTemplateAsync(string name, Func selector = null)
+		{
+			selector = selector ?? (s => s);
+			return this.DispatchAsync(
+				d => selector(d.Name(name)),
+				(p, d) => this.RawDispatch.GetTemplateDispatchAsync(p, d)
+			);
+		}
+
+		public Task GetSearchTemplateAsync(IGetSearchTemplateRequest request)
+		{
+			return this.DispatchAsync(
+				request,
+				(p, d) => this.RawDispatch.GetTemplateDispatchAsync(p, d)
+			);
+		}
+
+		public IPutSearchTemplateResponse PutSearchTemplate(string name, Func selector = null)
+		{
+			selector = selector ?? (s => s);
+			return this.Dispatch(
+				d => selector(d.Name(name)),
+				(p, d) => this.RawDispatch.PutTemplateDispatch(p, d)
+			);
+		}
+
+		public IPutSearchTemplateResponse PutSearchTemplate(IPutSearchTemplateRequest request)
+		{
+			return this.Dispatch(
+				request,
+				(p, d) => this.RawDispatch.PutTemplateDispatch(p, d)
+			);
+		}
+
+		public Task PutSearchTemplateAsync(string name, Func selector = null)
+		{
+			selector = selector ?? (s => s);
+			return this.DispatchAsync(
+				d => selector(d.Name(name)),
+				(p, d) => this.RawDispatch.PutTemplateDispatchAsync(p, d)
+			);
+		}
+
+		public Task PutSearchTemplateAsync(IPutSearchTemplateRequest request)
+		{
+			return this.DispatchAsync(
+				request,
+				(p, d) => this.RawDispatch.PutTemplateDispatchAsync(p, d)
+			);
+		}
+
+		public IDeleteSearchTemplateResponse DeleteSearchTemplate(string name, Func selector = null)
+		{
+			selector = selector ?? (s => s);
+			return this.Dispatch(
+				d => selector(d.Name(name)),
+				(p, d) => this.RawDispatch.DeleteTemplateDispatch(p)
+			);
+		}
+
+		public IDeleteSearchTemplateResponse DeleteSearchTemplate(IDeleteSearchTemplateRequest request)
+		{
+			return this.Dispatch(
+				request,
+				(p, d) => this.RawDispatch.DeleteTemplateDispatch(p)
+			);
+		}
+
+		public Task DeleteSearchTemplateAsync(string name, Func selector = null)
+		{
+			selector = selector ?? (s => s);
+			return this.DispatchAsync(
+				d => selector(d.Name(name)),
+				(p, d) => this.RawDispatch.DeleteTemplateDispatchAsync(p)
+			);
+		}
+
+		public Task DeleteSearchTemplateAsync(IDeleteSearchTemplateRequest request)
+		{
+			return this.DispatchAsync(
+				request,
+				(p, d) => this.RawDispatch.DeleteTemplateDispatchAsync(p)
+			);
+		}
+
+		private SearchResponse FieldsSearchDeserializer(IElasticsearchResponse response, Stream stream, ISearchTemplateRequest d)
+			where T : class
+			where TResult : class
+		{
+			var converter = this.CreateCovariantSearchSelector(d);
+			var dict = response.Success
+				? Serializer.DeserializeInternal>(stream, converter)
+				: null;
+			return dict;
+		}
+
+		private Func> CreateSearchDeserializer(ISearchTemplateRequest request)
+			where T : class
+			where TResult : class
+		{
+
+			Func> responseCreator =
+					(r, s) => this.FieldsSearchDeserializer(r, s, request);
+			return responseCreator;
+		}
+
+		private JsonConverter CreateCovariantSearchSelector(ISearchTemplateRequest originalSearchDescriptor)
+			where T : class
+			where TResult : class
+		{
+			SearchTemplatePathInfo.CloseOverAutomagicCovariantResultSelector(this.Infer, originalSearchDescriptor);
+			return originalSearchDescriptor.TypeSelector == null ? null : new ConcreteTypeConverter(originalSearchDescriptor.TypeSelector);
+		}
+	}
+}
diff --git a/src/Nest/IElasticClient.cs b/src/Nest/IElasticClient.cs
index c5350819b77..c2b91d09bcf 100644
--- a/src/Nest/IElasticClient.cs
+++ b/src/Nest/IElasticClient.cs
@@ -774,6 +774,84 @@ Task> SearchAsync(ISearchRequest request)
 			where T : class
 			where TResult : class;
 
+		/// 
+		/// The /_search/template endpoint allows to use the mustache language to pre render search 
+		/// requests, before they are executed and fill existing templates with template parameters.
+		/// 
+		/// The type used to infer the index and typename as well describe the query strongly typed
+		/// A descriptor that describes the parameters for the search operation
+		/// 
+		ISearchResponse SearchTemplate(Func, SearchTemplateDescriptor> selector)
+			where T : class;
+
+		/// 
+		ISearchResponse SearchTemplate(Func, SearchTemplateDescriptor> selector)
+			where T : class
+			where TResult : class;
+
+		/// 
+		ISearchResponse SearchTemplate(ISearchTemplateRequest request)
+			where T : class;
+
+		/// 
+		ISearchResponse SearchTemplate(ISearchTemplateRequest request)
+			where T : class
+			where TResult : class;
+
+		/// 
+		Task> SearchTemplateAsync(Func, SearchTemplateDescriptor> selector)
+			where T : class;
+
+		/// 
+		Task> SearchTemplateAsync(Func, SearchTemplateDescriptor> selector)
+			where T : class
+			where TResult : class;
+
+		/// 
+		Task> SearchTemplateAsync(ISearchTemplateRequest request)
+			where T : class;
+
+		/// 
+		Task> SearchTemplateAsync(ISearchTemplateRequest request)
+			where T : class
+			where TResult : class;
+
+		/// 
+		IGetSearchTemplateResponse GetSearchTemplate(string name, Func selector = null);
+
+		/// 
+		IGetSearchTemplateResponse GetSearchTemplate(IGetSearchTemplateRequest request);
+
+		/// 
+		Task GetSearchTemplateAsync(string name, Func selector = null);
+
+		/// 
+		Task GetSearchTemplateAsync(IGetSearchTemplateRequest request);
+
+		/// 
+		IPutSearchTemplateResponse PutSearchTemplate(string name, Func selector = null);
+
+		/// 
+		IPutSearchTemplateResponse PutSearchTemplate(IPutSearchTemplateRequest request);
+
+		/// 
+		Task PutSearchTemplateAsync(string name, Func selector = null);
+
+		/// 
+		Task PutSearchTemplateAsync(IPutSearchTemplateRequest request);
+
+		/// 
+		IDeleteSearchTemplateResponse DeleteSearchTemplate(string name, Func selector = null);
+
+		/// 
+		IDeleteSearchTemplateResponse DeleteSearchTemplate(IDeleteSearchTemplateRequest request);
+
+		/// 
+		Task DeleteSearchTemplateAsync(string name, Func selector = null);
+
+		/// 
+		Task DeleteSearchTemplateAsync(IDeleteSearchTemplateRequest request);
+
 		/// 
 		/// The multi search API allows to execute several search requests within the same API.
 		/// http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-multi-search.html
diff --git a/src/Nest/Nest.csproj b/src/Nest/Nest.csproj
index 1bd5fd157d2..6461d010465 100644
--- a/src/Nest/Nest.csproj
+++ b/src/Nest/Nest.csproj
@@ -179,12 +179,15 @@
     
     
     
+    
     
     
     
+    
     
     
     
+    
     
     
     
@@ -194,6 +197,10 @@
     
     
     
+    
+    
+    
+    
     
     
     
@@ -209,6 +216,7 @@
     
     
     
+    
     
     
     
@@ -299,6 +307,7 @@
     
     
     
+    
     
     
     
@@ -542,7 +551,7 @@
       Code
     
     
-    
+    
     
     
     
diff --git a/src/Nest/RawDispatch.generated.cs b/src/Nest/RawDispatch.generated.cs
index 27ca7155806..223dfcf9f02 100644
--- a/src/Nest/RawDispatch.generated.cs
+++ b/src/Nest/RawDispatch.generated.cs
@@ -946,6 +946,66 @@ internal Task> DeleteByQueryDispatchAsync(Elasticsea
 		}
 		
 		
+		internal ElasticsearchResponse DeleteScriptDispatch(ElasticsearchPathInfo pathInfo )
+		{
+			switch(pathInfo.HttpMethod)
+			{
+				case PathInfoHttpMethod.DELETE:
+					//DELETE /_scripts/{lang}/{id}
+					if (!pathInfo.Lang.IsNullOrEmpty() && !pathInfo.Id.IsNullOrEmpty())
+						return this.Raw.DeleteScript(pathInfo.Lang,pathInfo.Id,u => pathInfo.RequestParameters);
+					break;
+
+			}
+			throw new DispatchException("Could not dispatch IElasticClient.DeleteScript() into any of the following paths: \r\n - /_scripts/{lang}/{id}");
+		}
+		
+		
+		internal Task> DeleteScriptDispatchAsync(ElasticsearchPathInfo pathInfo )
+		{
+			switch(pathInfo.HttpMethod)
+			{
+				case PathInfoHttpMethod.DELETE:
+					//DELETE /_scripts/{lang}/{id}
+					if (!pathInfo.Lang.IsNullOrEmpty() && !pathInfo.Id.IsNullOrEmpty())
+						return this.Raw.DeleteScriptAsync(pathInfo.Lang,pathInfo.Id,u => pathInfo.RequestParameters);
+					break;
+
+			}
+			throw new DispatchException("Could not dispatch IElasticClient.DeleteScript() into any of the following paths: \r\n - /_scripts/{lang}/{id}");
+		}
+		
+		
+		internal ElasticsearchResponse DeleteTemplateDispatch(ElasticsearchPathInfo pathInfo )
+		{
+			switch(pathInfo.HttpMethod)
+			{
+				case PathInfoHttpMethod.DELETE:
+					//DELETE /_search/template/{id}
+					if (!pathInfo.Id.IsNullOrEmpty())
+						return this.Raw.DeleteTemplate(pathInfo.Id,u => pathInfo.RequestParameters);
+					break;
+
+			}
+			throw new DispatchException("Could not dispatch IElasticClient.DeleteTemplate() into any of the following paths: \r\n - /_search/template/{id}");
+		}
+		
+		
+		internal Task> DeleteTemplateDispatchAsync(ElasticsearchPathInfo pathInfo )
+		{
+			switch(pathInfo.HttpMethod)
+			{
+				case PathInfoHttpMethod.DELETE:
+					//DELETE /_search/template/{id}
+					if (!pathInfo.Id.IsNullOrEmpty())
+						return this.Raw.DeleteTemplateAsync(pathInfo.Id,u => pathInfo.RequestParameters);
+					break;
+
+			}
+			throw new DispatchException("Could not dispatch IElasticClient.DeleteTemplate() into any of the following paths: \r\n - /_search/template/{id}");
+		}
+		
+		
 		internal ElasticsearchResponse ExistsDispatch(ElasticsearchPathInfo pathInfo )
 		{
 			switch(pathInfo.HttpMethod)
@@ -1048,6 +1108,36 @@ internal Task> GetDispatchAsync(ElasticsearchPathInf
 		}
 		
 		
+		internal ElasticsearchResponse GetScriptDispatch(ElasticsearchPathInfo pathInfo )
+		{
+			switch(pathInfo.HttpMethod)
+			{
+				case PathInfoHttpMethod.GET:
+					//GET /_scripts/{lang}/{id}
+					if (!pathInfo.Lang.IsNullOrEmpty() && !pathInfo.Id.IsNullOrEmpty())
+						return this.Raw.GetScript(pathInfo.Lang,pathInfo.Id,u => pathInfo.RequestParameters);
+					break;
+
+			}
+			throw new DispatchException("Could not dispatch IElasticClient.GetScript() into any of the following paths: \r\n - /_scripts/{lang}/{id}");
+		}
+		
+		
+		internal Task> GetScriptDispatchAsync(ElasticsearchPathInfo pathInfo )
+		{
+			switch(pathInfo.HttpMethod)
+			{
+				case PathInfoHttpMethod.GET:
+					//GET /_scripts/{lang}/{id}
+					if (!pathInfo.Lang.IsNullOrEmpty() && !pathInfo.Id.IsNullOrEmpty())
+						return this.Raw.GetScriptAsync(pathInfo.Lang,pathInfo.Id,u => pathInfo.RequestParameters);
+					break;
+
+			}
+			throw new DispatchException("Could not dispatch IElasticClient.GetScript() into any of the following paths: \r\n - /_scripts/{lang}/{id}");
+		}
+		
+		
 		internal ElasticsearchResponse GetSourceDispatch(ElasticsearchPathInfo pathInfo )
 		{
 			switch(pathInfo.HttpMethod)
@@ -1078,6 +1168,36 @@ internal Task> GetSourceDispatchAsync(ElasticsearchP
 		}
 		
 		
+		internal ElasticsearchResponse GetTemplateDispatch(ElasticsearchPathInfo pathInfo , object body)
+		{
+			switch(pathInfo.HttpMethod)
+			{
+				case PathInfoHttpMethod.GET:
+					//GET /_search/template/{id}
+					if (!pathInfo.Id.IsNullOrEmpty())
+						return this.Raw.GetTemplate(pathInfo.Id,u => pathInfo.RequestParameters);
+					break;
+
+			}
+			throw new DispatchException("Could not dispatch IElasticClient.GetTemplate() into any of the following paths: \r\n - /_search/template/{id}");
+		}
+		
+		
+		internal Task> GetTemplateDispatchAsync(ElasticsearchPathInfo pathInfo , object body)
+		{
+			switch(pathInfo.HttpMethod)
+			{
+				case PathInfoHttpMethod.GET:
+					//GET /_search/template/{id}
+					if (!pathInfo.Id.IsNullOrEmpty())
+						return this.Raw.GetTemplateAsync(pathInfo.Id,u => pathInfo.RequestParameters);
+					break;
+
+			}
+			throw new DispatchException("Could not dispatch IElasticClient.GetTemplate() into any of the following paths: \r\n - /_search/template/{id}");
+		}
+		
+		
 		internal ElasticsearchResponse IndexDispatch(ElasticsearchPathInfo pathInfo , object body)
 		{
 			switch(pathInfo.HttpMethod)
@@ -3138,6 +3258,90 @@ internal Task> PingDispatchAsync(ElasticsearchPathIn
 		}
 		
 		
+		internal ElasticsearchResponse PutScriptDispatch(ElasticsearchPathInfo pathInfo , object body)
+		{
+			switch(pathInfo.HttpMethod)
+			{
+				case PathInfoHttpMethod.PUT:
+					//PUT /_scripts/{lang}/{id}
+					if (!pathInfo.Lang.IsNullOrEmpty() && !pathInfo.Id.IsNullOrEmpty() && body != null)
+						return this.Raw.PutScript(pathInfo.Lang,pathInfo.Id,body,u => pathInfo.RequestParameters);
+					break;
+
+				case PathInfoHttpMethod.POST:
+					//POST /_scripts/{lang}/{id}
+					if (!pathInfo.Lang.IsNullOrEmpty() && !pathInfo.Id.IsNullOrEmpty() && body != null)
+						return this.Raw.PutScriptPost(pathInfo.Lang,pathInfo.Id,body,u => pathInfo.RequestParameters);
+					break;
+
+			}
+			throw new DispatchException("Could not dispatch IElasticClient.PutScript() into any of the following paths: \r\n - /_scripts/{lang}/{id}");
+		}
+		
+		
+		internal Task> PutScriptDispatchAsync(ElasticsearchPathInfo pathInfo , object body)
+		{
+			switch(pathInfo.HttpMethod)
+			{
+				case PathInfoHttpMethod.PUT:
+					//PUT /_scripts/{lang}/{id}
+					if (!pathInfo.Lang.IsNullOrEmpty() && !pathInfo.Id.IsNullOrEmpty() && body != null)
+						return this.Raw.PutScriptAsync(pathInfo.Lang,pathInfo.Id,body,u => pathInfo.RequestParameters);
+					break;
+
+				case PathInfoHttpMethod.POST:
+					//POST /_scripts/{lang}/{id}
+					if (!pathInfo.Lang.IsNullOrEmpty() && !pathInfo.Id.IsNullOrEmpty() && body != null)
+						return this.Raw.PutScriptPostAsync(pathInfo.Lang,pathInfo.Id,body,u => pathInfo.RequestParameters);
+					break;
+
+			}
+			throw new DispatchException("Could not dispatch IElasticClient.PutScript() into any of the following paths: \r\n - /_scripts/{lang}/{id}");
+		}
+		
+		
+		internal ElasticsearchResponse PutTemplateDispatch(ElasticsearchPathInfo pathInfo , object body)
+		{
+			switch(pathInfo.HttpMethod)
+			{
+				case PathInfoHttpMethod.PUT:
+					//PUT /_search/template/{id}
+					if (!pathInfo.Id.IsNullOrEmpty() && body != null)
+						return this.Raw.PutTemplate(pathInfo.Id,body,u => pathInfo.RequestParameters);
+					break;
+
+				case PathInfoHttpMethod.POST:
+					//POST /_search/template/{id}
+					if (!pathInfo.Id.IsNullOrEmpty() && body != null)
+						return this.Raw.PutTemplatePost(pathInfo.Id,body,u => pathInfo.RequestParameters);
+					break;
+
+			}
+			throw new DispatchException("Could not dispatch IElasticClient.PutTemplate() into any of the following paths: \r\n - /_search/template/{id}");
+		}
+		
+		
+		internal Task> PutTemplateDispatchAsync(ElasticsearchPathInfo pathInfo , object body)
+		{
+			switch(pathInfo.HttpMethod)
+			{
+				case PathInfoHttpMethod.PUT:
+					//PUT /_search/template/{id}
+					if (!pathInfo.Id.IsNullOrEmpty() && body != null)
+						return this.Raw.PutTemplateAsync(pathInfo.Id,body,u => pathInfo.RequestParameters);
+					break;
+
+				case PathInfoHttpMethod.POST:
+					//POST /_search/template/{id}
+					if (!pathInfo.Id.IsNullOrEmpty() && body != null)
+						return this.Raw.PutTemplatePostAsync(pathInfo.Id,body,u => pathInfo.RequestParameters);
+					break;
+
+			}
+			throw new DispatchException("Could not dispatch IElasticClient.PutTemplate() into any of the following paths: \r\n - /_search/template/{id}");
+		}
+		
+		
 		internal ElasticsearchResponse ScrollDispatch(ElasticsearchPathInfo pathInfo , object body)
 		{
 			switch(pathInfo.HttpMethod)
diff --git a/src/Tests/Nest.Tests.Integration/Template/TemplateTests.cs b/src/Tests/Nest.Tests.Integration/Indices/IndicesTemplateTests.cs
similarity index 97%
rename from src/Tests/Nest.Tests.Integration/Template/TemplateTests.cs
rename to src/Tests/Nest.Tests.Integration/Indices/IndicesTemplateTests.cs
index dfc74255d44..e55a066a388 100644
--- a/src/Tests/Nest.Tests.Integration/Template/TemplateTests.cs
+++ b/src/Tests/Nest.Tests.Integration/Indices/IndicesTemplateTests.cs
@@ -2,10 +2,10 @@
 using Nest.Tests.MockData.Domain;
 using NUnit.Framework;
 
-namespace Nest.Tests.Integration.Template
+namespace Nest.Tests.Integration.Indices
 {
 	[TestFixture]
-	public class TemplateTests : IntegrationTests
+	public class IndicesTemplateTests : IntegrationTests
 	{
 
 		[Test]
diff --git a/src/Tests/Nest.Tests.Integration/Nest.Tests.Integration.csproj b/src/Tests/Nest.Tests.Integration/Nest.Tests.Integration.csproj
index a953583c60a..340102c482f 100644
--- a/src/Tests/Nest.Tests.Integration/Nest.Tests.Integration.csproj
+++ b/src/Tests/Nest.Tests.Integration/Nest.Tests.Integration.csproj
@@ -179,6 +179,7 @@
     
     
     
+    
     
     
     
@@ -232,6 +233,7 @@
     
     
     
+    
     
     
     
@@ -239,7 +241,7 @@
     
     
     
-    
+    
     
     
   
diff --git a/src/Tests/Nest.Tests.Integration/Search/Query/TemplateQueryTests.cs b/src/Tests/Nest.Tests.Integration/Search/Query/TemplateQueryTests.cs
new file mode 100644
index 00000000000..efae93b45f3
--- /dev/null
+++ b/src/Tests/Nest.Tests.Integration/Search/Query/TemplateQueryTests.cs
@@ -0,0 +1,35 @@
+
+using FluentAssertions;
+using Nest.Tests.MockData.Domain;
+using NUnit.Framework;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Nest.Tests.Integration.Search.Query
+{
+	[TestFixture]
+	public class TemplateQueryTests : IntegrationTests
+	{
+		[Test]
+		public void TemplateQuery()
+		{
+			var r = this.Client.Search(s => s
+				.Query(q => q
+					.Template(t => t
+						.Query("{ \"match\": { \"{{my_field}}\": { \"query\": \"{{my_value}}\" } } }")
+						.Params(p => p
+							.Add("my_field", "name")
+							.Add("my_value", "em-elasticsearch")
+						)
+					)
+				)
+			);
+
+			r.IsValid.Should().BeTrue();
+			r.Hits.Count().Should().BeGreaterThan(0);
+		}
+	}
+}
diff --git a/src/Tests/Nest.Tests.Integration/Search/Template/SearchTemplateTests.cs b/src/Tests/Nest.Tests.Integration/Search/Template/SearchTemplateTests.cs
new file mode 100644
index 00000000000..3e2a26523c5
--- /dev/null
+++ b/src/Tests/Nest.Tests.Integration/Search/Template/SearchTemplateTests.cs
@@ -0,0 +1,98 @@
+using FluentAssertions;
+using Nest.Tests.MockData.Domain;
+using Newtonsoft.Json.Linq;
+using NUnit.Framework;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Nest.Tests.Integration.Search.Template
+{
+	[TestFixture]
+	public class SearchTemplateTests : IntegrationTests
+	{
+		private string _template = "{\"from\": \"{{my_from}}\",\"size\": \"{{my_size}}\",\"query\": { \"match\": {\"{{my_field}}\": {\"query\": \"{{my_value}}\" }}}}";
+
+		[Test]
+		public void SearchTemplateByQuery()
+		{
+			var result = this.Client.SearchTemplate(s => s
+				.Template(_template)
+				.Params(p => p
+					.Add("my_from", 0)
+					.Add("my_size", 5)
+					.Add("my_field", "name")
+					.Add("my_value", "em-elasticsearch")
+				)
+			);
+
+			result.IsValid.Should().BeTrue();
+			result.Hits.Count().Should().BeGreaterThan(0);
+		}
+
+		[Test]
+		public void SearchTemplateByQuery_ObjectInitializer()
+		{
+			var request = new SearchTemplateRequest
+			{
+				Template = _template,
+				Params = new Dictionary
+				{
+					{ "my_from", 0 },
+					{ "my_size", 5 },
+					{ "my_field", "name" },
+					{ "my_value", "em-elasticsearch" }
+				}
+			};
+
+			var result = this.Client.SearchTemplate(request);
+
+			result.IsValid.Should().BeTrue();
+			result.Hits.Count().Should().BeGreaterThan(0);
+		}
+
+		[Test]
+		public void SearchTemplateById()
+		{
+			var templateName = "myIndexedTemplate";
+
+			var putTemplateResult = this.Client.PutSearchTemplate(templateName, t => t.Template(_template));
+			putTemplateResult.IsValid.Should().BeTrue();
+
+			var result = this.Client.SearchTemplate(s => s
+				.Id(templateName)
+				.Params(p => p
+					.Add("my_from", 0)
+					.Add("my_size", 5)
+					.Add("my_field", "name")
+					.Add("my_value", "em-elasticsearch")
+				)
+			);
+
+			result.IsValid.Should().BeTrue();
+			result.Hits.Count().Should().BeGreaterThan(0);
+
+			var deleteTemplateResult = this.Client.DeleteSearchTemplate(templateName);
+			deleteTemplateResult.IsValid.Should().BeTrue();
+		}
+
+		[Test]
+		public void PutGetAndDeleteTemplate()
+		{
+			var templateName = "myIndexedTemplate";
+
+			var putResult = this.Client.PutSearchTemplate(templateName, t => t.Template(_template));
+			putResult.IsValid.Should().BeTrue();
+
+			var getResult = this.Client.GetSearchTemplate(templateName);
+			getResult.IsValid.Should().BeTrue();
+			getResult.Template.ShouldBeEquivalentTo(_template);
+			
+			var deleteResult = this.Client.DeleteSearchTemplate(templateName);
+			deleteResult.IsValid.Should().BeTrue();
+		}
+	}
+}
+
diff --git a/src/Tests/Nest.Tests.Unit/Nest.Tests.Unit.csproj b/src/Tests/Nest.Tests.Unit/Nest.Tests.Unit.csproj
index 77e9441ad9a..8e647fe5ffc 100644
--- a/src/Tests/Nest.Tests.Unit/Nest.Tests.Unit.csproj
+++ b/src/Tests/Nest.Tests.Unit/Nest.Tests.Unit.csproj
@@ -405,6 +405,7 @@
     
     
     
+    
     
     
     
diff --git a/src/Tests/Nest.Tests.Unit/Search/Query/Singles/TemplateQueryJson.cs b/src/Tests/Nest.Tests.Unit/Search/Query/Singles/TemplateQueryJson.cs
new file mode 100644
index 00000000000..a6a4f184502
--- /dev/null
+++ b/src/Tests/Nest.Tests.Unit/Search/Query/Singles/TemplateQueryJson.cs
@@ -0,0 +1,74 @@
+using Nest.Tests.MockData.Domain;
+using NUnit.Framework;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Nest.Tests.Unit.Search.Query.Singles
+{
+	[TestFixture]
+	public class TemplateQueryJson : BaseJsonTests
+	{
+		[Test]
+		public void TemplateQuery()
+		{
+			var s = new SearchDescriptor()
+				.From(0)
+				.Size(10)
+				.Query(q => q
+					.Template(t => t
+						.Query("match_{{template}}")
+						.Params(p => p
+							.Add("template", "all")
+						)
+					)
+			);
+
+			var json = TestElasticClient.Serialize(s);
+			var expected = @"{ from: 0, size: 10,
+				  query: {
+					template: {
+					  query: ""match_{{template}}"",
+					  ""params"": {
+						template: ""all""
+					  }
+					}
+				  }
+				}";
+
+			Assert.True(json.JsonEquals(expected), json);
+		}
+
+		[Test]
+		public void TemplateQueryWithEscapeString()
+		{
+			var s = new SearchDescriptor()
+				.From(0)
+				.Size(10)
+				.Query(q => q
+					.Template(t => t
+						.Query("\"match_{{template}}\": {}}\"")
+						.Params(p => p
+							.Add("template", "all")
+						)
+					)
+			);
+
+			var json = TestElasticClient.Serialize(s);
+			var expected = @"{ from: 0, size: 10,
+				  query: {
+					template: {
+					  query: ""\""match_{{template}}\"": {}}\"""",
+					  ""params"": {
+						template: ""all""
+					  }
+					}
+				  }
+				}";
+
+			Assert.True(json.JsonEquals(expected), json);
+		}
+	}
+}