For example assume mapping is following :
ID User Color
1 one blue
2 one black
3 two orange
4 two yellow
Needed Result is.
ID User Color
1 one blue, black
2 two orange, yellow
In case of SQL this can be done by GroupBy and STUFF.
How this can be done in ES.