I am wondering whether elasticsearch has aggregations (other than script aggregation) to support set operations (e.g: union, subtract) like below:
Input:
{ "users": [ "mary", "john"] }
{ "users": [ "john", "alice"] }
{ "users": [ "bob"] }
Aggregated output:
{"allUsers": ["mary", "john", "alice", "bob"]}
It will be similar to Oracle DB's LISTAGG function but without duplicates (LISTAGG)