Solr returns each facet as a collection of name/count pairs (wrapped in a FacetField). In my faceted search app I would use these as follows.
Audi (2)
Honda (5)
Mitsubishi (6)
Mercedes Benz (8)
Now I would like to turn this into a list of links. I could create URLs like
http://www.example.com/category=Mercedes%20Benz
That would work, but I would much rather have
http://www.example.com/category=4
That is, I would like to use the database ID of the categories/brands instead of their names.
Can I somehow link fields in Solr, so that I can link the category name to the category ID and have them both returned from my query? Or should I use a multivalued field and store the category name and id together?
Your advice is most welcome :)