How to get the completness of each column by group

I'm trying to get the completeness of every column grouped by a categorical field that know to be 100% complete.

Currently I'm able to get the completeness for any given column, grouped by the grouping field like this:

{
  "size": 0,
  "aggs": {
    "where_field_I_want": {
      "filter": {
        "exists": {
          "field": "field_I_want"
        }
      },
      "aggs" : {
        "group_by_field_to_group_by": {
          "terms": {
            "field": "field_to_group_by",
            "order": { "_term" : "asc" },
            "size": 1000
          }
        }
      }
    }
  }
}

Is there any easy way to get the count of every column? I tried adding a second filter>exists>field but it didn't work.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.