Search code examples
solrfacet

How to use id and facets with Solr


I have those kind of documents to index in Solr :

  • title
  • authorName
  • authorId

I want to make a facet on the authorId field , but I want to display the authorName (the authorId is the better way to know if an author is different or not from an other author.

Do you think it's possible ?

Thanks a lot,

Antoine


Solution

  • No, but you could facet on another field that is authorName and authorId concatenated (i.e. "John Grisham--332245", then before showing the facets you remove the authorId from the facet values.