# List searchtemplates

**URL:** https://discuss.elastic.co/t/list-searchtemplates/31522
**Category:** Elasticsearch
**Created:** [October 2, 2015, 7:06am UTC](https://discuss.elastic.co/t/list-searchtemplates/31522 "2015-10-02T07:06:06Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![trycoon](https://avatars.discourse-cdn.com/v4/letter/t/dfb087/32.png) [@trycoon](https://discuss.elastic.co/u/trycoon)
#### Post date: [October 2, 2015, 7:06am UTC](https://discuss.elastic.co/t/list-searchtemplates/31522/1 "2015-10-02T07:06:06Z")

</div>

There are ways to list installed indextemplates, but no one for listing searchtemplates what I know of. [https://www.elastic.co/guide/en/elasticsearch/reference/1.7/search-template.html](https://www.elastic.co/guide/en/elasticsearch/reference/1.7/search-template.html)

I can upload new templates using the REST-interface, I can remove them, update them, fetch them (if I know the exact names), but I can't or search for all the available ones.

I resource like these wound be nice

GET \_search/template  
GET \_search/template/\_all  
GET \_search/template/mytemplat\*

There are issues about it, does any one knows if there are any progress?

> <https://github.com/Asquera/elasticsearch-rake-tasks/issues/23>

  

> <https://github.com/elastic/elasticsearch/issues/5637>

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [October 3, 2015, 11:31pm UTC](https://discuss.elastic.co/t/list-searchtemplates/31522/2 "2015-10-03T23:31:08Z")

</div>

The docs mention you can do this - [https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html)

What version are you on?

---

<div class="post-metadata">

### Author: ![trycoon](https://avatars.discourse-cdn.com/v4/letter/t/dfb087/32.png) [@trycoon](https://discuss.elastic.co/u/trycoon)
#### Post date: [October 6, 2015, 6:54pm UTC](https://discuss.elastic.co/t/list-searchtemplates/31522/3 "2015-10-06T18:54:50Z")

</div>

I fail to see any documentation about how to list available templates in the page you specified. They write about how to upload a template, delete, and execute it. Also a bit of the Mustache-templating, but nothing about listing available templates. Or am I missing something?

I'm running ES 1.4 but I've tried 1.7 also.

Currently I'm getting around the problem by using the fact that templates are stored in a index them self, so I query /.script/\_search to get the list. It's a hack, not nice, but it's working.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [October 6, 2015, 8:50pm UTC](https://discuss.elastic.co/t/list-searchtemplates/31522/4 "2015-10-06T20:50:25Z")

</div>

`GET /_search/template` doesn't list them?

---

<div class="post-metadata">

### Author: ![trycoon](https://avatars.discourse-cdn.com/v4/letter/t/dfb087/32.png) [@trycoon](https://discuss.elastic.co/u/trycoon)
#### Post date: [October 7, 2015, 9:05am UTC](https://discuss.elastic.co/t/list-searchtemplates/31522/5 "2015-10-07T09:05:22Z")

</div>

No, it gives me the same result as GET /\_search, in other words every content in elastic. I did the test on ES 1.7.1  
Thanks for all suggestions anyway.

---

<div class="post-metadata">

### Author: ![trycoon](https://avatars.discourse-cdn.com/v4/letter/t/dfb087/32.png) [@trycoon](https://discuss.elastic.co/u/trycoon)
#### Post date: [October 7, 2015, 9:07am UTC](https://discuss.elastic.co/t/list-searchtemplates/31522/6 "2015-10-07T09:07:52Z")

</div>

Does it work for you? Or anybody else?  
Did you upload your templates using REST or by file? I'm using REST.

---

<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 5, 2017, 11:46pm UTC](https://discuss.elastic.co/t/list-searchtemplates/31522/7 "2017-07-05T23:46:14Z")

</div>


