# Search template in bulk

**URL:** <https://discuss.elastic.co/t/search-template-in-bulk/20865>\
**Category:** Elasticsearch\
**Created:** [November 20, 2014, 10:47am UTC](https://discuss.elastic.co/t/search-template-in-bulk/20865 "2014-11-20T10:47:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Viranch\_Mehta](https://avatars.discourse-cdn.com/v4/letter/v/51bf81/32.png) [@Viranch\_Mehta](https://discuss.elastic.co/u/Viranch_Mehta)\
**Post date:** [November 20, 2014, 10:47am UTC](https://discuss.elastic.co/t/search-template-in-bulk/20865/1 "2014-11-20T10:47:30Z")

</div>

Hey,

I was wondering if there is a way to execute search template queries in  
bulk.

For eg, I have couple of search templates registered in .scripts index. I  
want to run a bulk search template using these templates and different set  
of parameters for each search in bulk.

Example query could be:

cat requests  
{}  
{ "template": { "id": "tempalte1" },"params": { "title": "burger" } }  
{}  
{ "template": { "id": "tempalte2" },"params": { "title": "pizza" } }

GET /blogs/post/\_msearch/template --data-binary @requests; echo

Is a similar thing possible/planned?

Cheers,  
Viranch

--  
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/8d56cffc-65b6-41db-bf34-cd2ad2205e30%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8d56cffc-65b6-41db-bf34-cd2ad2205e30%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:48am UTC](https://discuss.elastic.co/t/search-template-in-bulk/20865/2 "2017-07-06T00:48:44Z")

</div>


