# Cannot load the registered search template file

**URL:** <https://discuss.elastic.co/t/cannot-load-the-registered-search-template-file/22086>\
**Category:** Elasticsearch\
**Created:** [February 11, 2015, 8:19am UTC](https://discuss.elastic.co/t/cannot-load-the-registered-search-template-file/22086 "2015-02-11T08:19:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Youxu1](https://avatars.discourse-cdn.com/v4/letter/y/b782af/32.png) [@Youxu1](https://discuss.elastic.co/u/Youxu1)\
**Post date:** [February 11, 2015, 8:19am UTC](https://discuss.elastic.co/t/cannot-load-the-registered-search-template-file/22086/1 "2015-02-11T08:19:10Z")

</div>

I create a search template as follows and save it to /config/scripts as mytemplate.mustache

{  
"template": {  
"query": {  
"terms": {  
"Keywords": [  
"{{#Keywords}}",  
"{{.}}",  
"{{/Keywords}}"  
]  
}  
}  
}  
}

Then tried to use the template in query:  
GET /\_search/template  
{  
"template": {  
"file" : "mytemplate.mustache"  
},  
"params": {  
"Keywords": ["office", "xbox"]  
}

But got following error:  
ElasticsearchIllegalArgumentException[Unable to find on disk script mytemplate.mustache]

What steps was I missing?  
}

---

<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:33am UTC](https://discuss.elastic.co/t/cannot-load-the-registered-search-template-file/22086/2 "2017-07-06T00:33:40Z")

</div>


