0

I am using elastic 1.5.0. When I run this block in the query:

"script_fields" : {
        "test1" : {
            "script" : "doc['actual_air_time'].value * 2",
             "lang":"groovy"
        }
    }

I get an error:

nested: ScriptException[dynamic scripting for [groovy] disabled]

How can I enable groovy script for elastic? Is there any other way to evaluate "test1" without using script_fields?

0

1 Answer 1

1

You can enable it in elasticsearch.yml, by setting:

script.groovy.sandbox.enabled: true

For more details see: http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html

Sign up to request clarification or add additional context in comments.

1 Comment

oops, I checked the link before but missed the section on enabling it. Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.