I have this simple data on ES::
curl -XPUT localhost:9200/dt/art/1 -d '{ "age": 77 }'
curl -XPUT localhost:9200/dt/art/2 -d '{ "age": 19 }'
curl -XPUT localhost:9200/dt/art/3 -d '{ "age": 42 }'
curl -XPUT localhost:9200/dt/art/4 -d '{ "age": 33 }'
How can I avoid to get in the answer the "took" and the "_shards" and only the have "hits" dictionary?
$ curl "localhost:9200/dt/art/_search?pretty" -d'{
    "query": {
      "bool": { "must": { "match_all": {} },
                "filter": {
                  "range": {
                  "age": { "gte": 20, "lte": 50}}}}}}'
{ "took" : 8, "timed_out" : false,
  "_shards" : { "total" : 5, "successful" : 5, "skipped" : 0, "failed" : 0 },
  "hits" : {
    "total" : 2,
    "max_score" : 1.0,
    "hits" : [
      { "_index" : "dt", "_type" : "art", "_id" : "4", "_score" : 1.0,
        "_source" : { "age" : 33 } },
      { "_index" : "dt", "_type" : "art", "_id" : "3", "_score" : 1.0,
        "_source" : { "age" : 42 } }
    ]
  }
}
$ 
as @IddoE say it's not about source filtering
 
    