sub aggregation with elasticsearch sub aggregation with elasticsearch elasticsearch elasticsearch

sub aggregation with elasticsearch


Here is the correct aggregation query (hint: you need to jump out of the nested context back into the parent one using reverse_nested)

{  "aggs": {    "members": {      "nested": {        "path": "members"      },      "aggs": {        "language": {          "terms": {            "field": "members.language"          },          "aggs": {            "parent": {              "reverse_nested": {},              "aggs": {                "date": {                  "date_histogram": {                    "field": "signupdate",                    "interval": "month"                  }                }              }            }          }        }      }    }  }}