If you keep the standard analyzer, the id will be split at the "-". So, if for your types lower and upper case are the same, you can just go with a simple facet query
curl -XPOST "http://localhost:9023/index/type/_search?size=0&pretty=true" -d
'{
"query" : {
{ "regexp":{ "id": "[A-Z]+" }
},
"facets" : {
"id" : {
"terms" : {
"field" : "id",
"size" : 50
}
}
}
}'
should give you somtehing that you can use.