# Rally with search templates?

**URL:** <https://discuss.elastic.co/t/rally-with-search-templates/178082>\
**Category:** Elasticsearch\
**Tags:** rally\
**Created:** [April 23, 2019, 5:08pm UTC](https://discuss.elastic.co/t/rally-with-search-templates/178082 "2019-04-23T17:08:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oli06](https://avatars.discourse-cdn.com/v4/letter/o/a5b964/32.png) [@Oli06](https://discuss.elastic.co/u/Oli06)\
**Post date:** [April 23, 2019, 5:08pm UTC](https://discuss.elastic.co/t/rally-with-search-templates/178082/1 "2019-04-23T17:08:27Z")

</div>

Hi there,

Is there a way in your rally tracks to use a search template for the search query ?

We've created Elasticsearch template using \_scripts/ that we can then use with \_search/template as follow:

GET index/\_search/template  
{  
"id": TEMPLATENAME,  
"params": {  
from: 0,  
size: 30,  
"paramName": "SOME PARAM FOR THE QUERY",  
...  
}  
}

It all works fine by hand but I haven't been able to tell rally to use a search template ☹

No much choice in the different rally operation-types (I could have hoped for a "search-template" type but it doesn't exist) thefore I use search:  
./operations/default.json: "operation-type": "search",

And in my track.py file in PureTermsQueryParamSource class I haven't found a way in the "result" variable to specify that I wanted to use a search template.

Any idea ?

Thanks for your help.  
Oli

---

<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:** [May 21, 2019, 5:08pm UTC](https://discuss.elastic.co/t/rally-with-search-templates/178082/2 "2019-05-21T17:08:29Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
