Terms aggregation for emails list

You can make the aggregations on "emails.keyword".

Something like:

"aggs": { "distinct_emails": { "terms": { "field": "emails.keyword" } }