I found the solution, the search string should be like:
{
"queryType": "SAILPOINT",
"indices":[
"identities"
],
"query": {
"query" : "attributes.uid:12345",
"innerHit": {
"type": "access",
"query": "(type:ROLE OR type:ACCESS_PROFILE) AND displayName:\"ABC*\""
}
},
"queryResultFilter": {
"includes": ["*"]
}
}