List searchtemplates

(Henrik Östman) #1

There are ways to list installed indextemplates, but no one for listing searchtemplates what I know of.

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?

(Mark Walkom) #2

The docs mention you can do this -

What version are you on?

How can I list existing search templates?
(Henrik Östman) #3

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.

(Mark Walkom) #4

GET /_search/template doesn't list them?

(Henrik Östman) #5

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.

(Henrik Östman) #6

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

(system) #7