Sudheer
Sudheer

Reputation: 1

Why I am getting error while executing this query in Elasticsearch

My query in ElasticSearch :

'filter':{              
  'script':{                
      'script':'_source.brand == \"samsung galaxy\"'        
   }        
 }

The error I get :

     {
          "shard": 0,
          "index": "test_database",
          "node": "yHIFcx8LQzCJHFYydcpdgA",
          "reason": {
            "type": "script_exception",
            "reason": "scripts of type [inline], operation [search] and lang [groovy] are disabled"
          }
        }
      ]
    },
    "status": 500
  }

Upvotes: 0

Views: 140

Answers (1)

Val
Val

Reputation: 217594

You need to enable dynamic scripting in elasticsearch.yml and then restart your node. Add this to your configuration file:

script.inline: true

Upvotes: 1

Related Questions