Template Query on embedded server results in "script_lang not supported [mustache]"

We use an embedded Elasticsearch within our Java integration tests, but upon upgrading to Elasticsearch 2 we are getting the following error on our Template Queries:

[{"type":"illegal_argument_exception","reason":"script_lang not supported [mustache]"}]

Template Query works fine on a stand-alone server.

Our maven dependencies have been set up with:

groupId: org.elasticsearch
artifactId: elasticsearch
version: 2.1.1

The code to start the embedded server looks more or less like this:

settings =  Settings.settingsBuilder()
    .put("path.home", dataDir.toString)
    .put("cluster.name", clusterName)
    .put("http.enabled", "true")
    .put("http.port", httpPort)
    .put("transport.tcp.port", PortFinder.random())
    .build();

nodeBuilder().local(true).settings(settings).build().start()

Anyone else having this sort of problem?

I can reproduce your issue.

I fixed it by adding this to my project:

1 Like

Thanks worked. Thanks for that.