es2csv icon indicating copy to clipboard operation
es2csv copied to clipboard

Export data from aggregation

Open salvob41 opened this issue 6 years ago • 0 comments

Is it possible to export data from aggregations ? How ?

I tried with a query like this:

{
  "size": 0,
  "aggs": {
    "unique": {
      "terms": {
        "field": "user.id",
        "order": {
          "_key": "asc"
        }
      }
    }
  }
}

And it just returns me the data with all the fields .. I would like the key and the doc_count. Is there a way?

salvob41 avatar Nov 21 '18 16:11 salvob41