# Registered Search Templates in multi search API (\_msearch)

**URL:** <https://discuss.elastic.co/t/registered-search-templates-in-multi-search-api--msearch/21729>\
**Category:** Elasticsearch\
**Created:** [January 20, 2015, 11:45am UTC](https://discuss.elastic.co/t/registered-search-templates-in-multi-search-api--msearch/21729 "2015-01-20T11:45:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dany\_Gielow](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@Dany\_Gielow](https://discuss.elastic.co/u/Dany_Gielow)\
**Post date:** [January 20, 2015, 11:45am UTC](https://discuss.elastic.co/t/registered-search-templates-in-multi-search-api--msearch/21729/1 "2015-01-20T11:45:59Z")

</div>

Hi,

Is it possible to use registered search templates in a multi search api  
(\_msearch) request?  
If so, how?

I tried giving the following query in a body.

{"template":{"id":"template\_1"},"params":{"a":1, "b":2}}

But that leads to the error:  
Parse Failure [No parser for element [template]]

I tried wrapping everything in a query and POSTing to \_msearch/template,  
but these don't work either.

Thanks in advance  
Dany

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/1f01e1cc-d6a4-4086-94d5-3961ee731da1%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/1f01e1cc-d6a4-4086-94d5-3961ee731da1%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:37am UTC](https://discuss.elastic.co/t/registered-search-templates-in-multi-search-api--msearch/21729/2 "2017-07-06T00:37:48Z")

</div>


