Posts

Showing posts from March, 2019

Solr Facet add link

Image
This is about how to link the resulting facet data from Solr on your web application. I am using Django as the front-end framework. But this solution applies to any language. The problem You have modeled your data and indexed to Solr. You will show facets on your web application to facilitate the navigation on your site to the users. You get faceted data from Solr; so far so good. The problem arises when you need to link your facet item to any destination other than the value of the facet itself, because Solr faceted data returns only the field value and count of occurences. The example below is a simplification of the Solr facet web page 1 , and show you how the json facet returns: {   "facet_counts" :{     "facet_queries" :{},     "facet_fields" :{       "categories" :[         "electronics" , 14 ,         "currency" , 4 ,         "memory" , 3 ,         "connector" , 2 ,