I don't know if I'm missing something but there doesn't seem to be a way to sort the result of a searchTemplate execution: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html.
The normal search-function takes a "sort"-parameter to specify on which field the results should be sorted: https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-search
But the searchTemplate-function are missing the sort-parameter: https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-searchtemplate
Is this correct?? It does limit the usefulness of the searchTemplate-function a lot.