Why I am getting error while executing this query

2019-09-19 05:27发布


My query in ElasticSearch :

      '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


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

script.inline: true