Hello, if I have data like this
| ID | Username | Role | |
|---|---|---|---|
| 1001 | johndoe | admin | johndoe@mail.com |
| 1001 | jonathan.doe | user | johndoe@mail.com |
| 1001 | johnnydoe | user | johndoe@mail.com |
Can I do some kind of grouping?
Notice that :
- ID is same for all rows
- there are 3 distinct usernames
- there are 2 distinct roles
- email is same for all rows
- Other ID might have different combination (e.g 4 distinct emails but all other data are the same)
Can I do query on elasticsearch, so I get data like this :
{
"id":"1001",
"username":[
"johndoe",
"jonathan.doe",
"johnnydoe"
],
"role":[
"admin",
"user"
],
"email":[
"johndoe@mail.com"
]
}
Thank you