title: I'm stuck at Script query in Elasticsearch
body: <p>I'm trying to run the following query:</p>
  
  <pre><code>curl -XGET localhost:9200/new_population/_search -d '{
  
  "query":{
  "bool" : {
      "must" : {
         "term":{"message":"developer"}
      },
      "filter" : {
          "script" : {
              "script" : "doc['birth'].value &gt; 20"
          }
      }
  }
  }
  }'
  </code></pre>
  
  <p>but I'm getting the below error:</p>
  
  <pre><code> {"error":{"root_cause":[{"type":"script_exception","reason":"scripts of type [inline], operation [search] and lang [groovy] are disabled"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"new_population","node":"AEKkYpmhRuWEOTJo64WKhg","reason":{"type":"script_exception","reason":"scripts of type [inline], operation [search] and lang [groovy] are disabled"}}]},"status":500}
  </code></pre>
  
  <p>I have even changed "script.engine.groovy.inline.aggs": on in .yml file
  Please help: I'm following this <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-script-query.html" rel="nofollow">link</a></p>