divanshu pratap divanshu pratap - 8 months ago 149
Groovy Question

Elastic search error operation [search] and lang [groovy] is disabled?

I am using elastic search 1.7.1 and when i am trying to use script_score or script_fields it is showing the error ScriptException[scripts of type inline], operation [search] and lang [groovy] is disabled can anyone please tell me how can i remove this error. my code is given below

function_score: {
query: {
query_string: {
query: shop_search,
fields: [ 'shop_name']
functions: [
script_score: {
script: "_score * doc['location'].value"


Add script.engine.groovy.inline.search: on to elasticsearch.yml configuration file and restart the node.