I'm trying to use this sample script query:
POST /_search
{
"script_fields": {
"my_field": {
"script": "1 + my_evar",
"params": {
"my_evar": 2
}
}
}
}
which results in the following error message:
"reason": "scripts of type [inline], operation [search] and lang [groovy] are disabled"
I've tried to enable scripting with this bit of elasticsearch.yml configuration:
script.inline: true
script.indexed: true
script.search: true
script.update: true
script.mapping: true
script.groovy.sandbox.enabled: true
Am I missing a setting?
Setting the the following in elasticsearch.yml worked for me.
script.engine.groovy.inline.search: on
thanks @Richa, I actually tried that but I got this error
script.disable_dynamic is not a supported setting, replace with fine-grained script settings. Dynamic scripts can be enabled for all languages and all operations by replacing
script.disable_dynamic: false
withscript.inline: on
andscript.indexed: on
So then I tried just these three settings and it worked fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With