I am using elasticsearch6 for one of my project. I am simply running some aggregation queries it but aggregations are not working. It is returning me hits even when the _source:false
in request body.
My query is like this
{
"size": 0,
"_source": [
"id"
],
"aggs": {
"countries": {
"terms": {
"field": "country_id"
}
}
}
}
and rather than returning the aggregates it is returning me the source of the documents. I am using elasticsearch head plugin to run the query