The object that I am indexing has both a UserId (a GUID) and a FullName property. I would like to do a faceted search using the UserId but display the FullName so that it's readable. I don't want to do the facet on the FullName since it technically doesn't have to be unique.
Right now I'm doing something like this:
{
"query": {
"match_all": {}
},
"facets": {
"userFacet": {
"terms": {
"field": "userId"
}
}
}
}
But then it is giving me the Guids in the response which I would need to hit the database to lookup the full name which is obviously not a real solution.
So how can I use one field to do the facets with and then a different field for the display values to use?