divanshu pratap divanshu pratap - 1 year ago 278
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"

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download