{
"XYZ": {
"mappings": {
"properties": {
"customerInfo": {
"properties": {
"emailList": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"id": {
"type": "text",
"fields": {
"completion": {
"type": "completion",
"analyzer": "standard",
"preserve_separators": true,
"preserve_position_increments": true,
"max_input_length": 50,
"contexts": [
{
"name": "mailboxIdStr",
"type": "CATEGORY",
"path": "mailboxIdStr"
}
]
},
"keyword": {
"type": "keyword"
}
}
},
"name": {
"type": "text",
"fields": {
"completion": {
"type": "completion",
"analyzer": "simple",
"preserve_separators": true,
"preserve_position_increments": true,
"max_input_length": 50,
"contexts": [
{
"name": "mailboxIdStr",
"type": "CATEGORY",
"path": "mailboxIdStr"
}
]
},
"keyword": {
"type": "keyword"
}
},
"fielddata": true
}
}
}
}
}
}
}
I need customer name group by customerid as per below.
Name customerid
John 1
John 2
John12 3