elasticsearch/elasticsearch-net — pull request #959 by gmarz (2014-09-22 19:53:24+00:00)
Title: Search template support

This PR adds multiple features related to search templates:

* Support for the [search template](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-template.html#search-template) endpoint
* Support for the [put](https://github.com/elasticsearch/elasticsearch/blob/master/rest-api-spec/api/put_template.json)/[get](https://github.com/elasticsearch/elasticsearch/blob/master/rest-api-spec/api/get_template.json)/[delete](https://github.com/elasticsearch/elasticsearch/blob/master/rest-api-spec/api/delete_template.json) search template endpoints
* Support for [template query](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-template-query.html#query-dsl-template-query)
* `TemplateBuilder` class to aid in building template queries using the Mustache template syntax on the fly

#### Things to note:
* The existing `GetTemplate()`, `PutTemplate()`, and `DeleteTemplate()` methods on the client are for **index** templates. We should consider renaming these in 2.0 to `GetIndexTemplate()`, `PutIndexTemplate()` and `DeleteIndexTemplate()` to reduce confusion between index and search templates.

* The `TemplateBuilder` still needs some work. It would be ideal to generate a string from the built up query so that it could be passed to the `template` portion of the endpoint, or `query` portion of the template query.