title: Elasticsearch : Javascript how to search with file template
body: <p>I've create an search template in a mustache file and place it on /config/scripts.</p>
  
  <p>I'm able to do a java search with this template by specifiing the templateType</p>
  
  <pre><code>SearchResponse sr = clientES.prepareSearch("symposium-statistique-application").setTypes("application")
              .setTemplateName("aggregationByApplicationsTemplate").setTemplateType(ScriptService.ScriptType.FILE)
  </code></pre>
  
  <p>Note : I'm able to do indexed searchTemplate in javascript, but i have to use file template.
                  .setTemplateParams(template_params).get();</p>
  
  <p>But i don't find in the documentation <a href="https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-searchtemplate" rel="nofollow">Elk javascript documentation</a>, how to do the same thing in javascript.</p>
  
  <p>Thanks in advance, Alexandre</p>