We use mustache search templates that have conditional clauses (those # symbols). Worked fine in 5.x when we could simply dump them to config/scripts folder... and ES would reload them pretty quick
Does not look like this file option is supported any more... 6.2.4 does not seem to process this folder... Is that correct or am I missing something?
And if we try to pre-register these templates, these '#' symbols cause issues... even when we escape the whole template source to be a String...
The documentation says that:
As written above, this template is not valid JSON because it includes the section markers like {{#line_no}}. For this reason, the template should either be stored in a file (see Pre-registered templateedit) or, when used via the REST API, should be written as a string:
This question was asked earlier by Jack_Fazackerley but was closed for no answers...
There is no path forward for these templates then in 6.x?
I think you are on to somethig there klof. Mucking with the format, I was able to put a simple template into cluster state. My real templates are hundreds of lines long so no luck there yet.
Here is the simple template that I was able to massage.
As for that surprise 2nd requirement, it turns out I had some hidden tabs in the old template files that were messing up. Removing those took care of it. No need to remove new lines.
Yes exactly, remove all the new lines helps.
But, it's not the proper way to do it, especially when you have to maintain a huge template.
you should be able to insert the template "pretty_printed".
Do you mind to send your big template in a gist file?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.