Dynamic scripting for local node for 1.6?

We are trying to upgrade to ES 1.6 from an ancient (pre-0.90) version. We have an extensive set of integration tests that use an embedded ES as a local node. Some of our tests exercise dynamic custom scoring scripts. These tests are failing under 1.6 with the following error:

script_score the script could not be loaded]; nested: ElasticsearchIllegalArgumentException[script_lang not supported [groovy]];

We realize we need to explicitly enable dynamic scripting in 1.6, but whether we try the deprecated setting (script.disable_dynamic) or the new fine-grained settings, we always get the same error.

The test set up is similar to:

val settings = ImmutableSettings.settingsBuilder()
    .put("node.local", true)
    .put("path.data", "/tmp")
    .put("cluster.name", "integration-test")
    .put("script.disable_dynamic", false)
    ...
    .build()

val client = nodeBuilder().settings(settings).node().client()

Is this a known limitation? A possible bug? Any help would be appreciated.

You are probably missing groovy dependency in your build. Try adding

    <dependency>
        <groupId>org.codehaus.groovy</groupId>
        <artifactId>groovy-all</artifactId>
        <version>2.4.0</version>
        <scope>compile</scope>
    </dependency>

Hi Igor,

Spot on! That was what we missed. Thank you!