Creating search template with client

Hello,

is it possible to create the a search template with the js client.
I use the official js client:
https://github.com/elasticsearch/elasticsearch-js and want to create a
search template described hier:
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-template.html

curl example for creation a search template:
How is this possible the with the js client?

curl -XPOST "http://localhost:9200/_search/template/example" -d'
{
"template": {
"query": {
"match": {
"title": "{{query_string}}"
}
}
}
}'

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/f0ef7642-3788-4a1a-bd77-43118161baa8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

found it my self:
http://www.elasticsearch.org/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-puttemplate

On Thursday, December 18, 2014 1:26:01 PM UTC+1, Benedikt Weiner wrote:

Hello,

is it possible to create the a search template with the js client.
I use the official js client:
https://github.com/elasticsearch/elasticsearch-js and want to create a
search template described hier:
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-template.html

curl example for creation a search template:
How is this possible the with the js client?

curl -XPOST "http://localhost:9200/_search/template/example" -d'
{
"template": {
"query": {
"match": {
"title": "{{query_string}}"
}
}
}
}'

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/ac643833-9dcb-47cb-8b1a-2b8797b6d1f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.