Creating a Custom Apache Solr Facet in Drupal

Posted onTuesday, 19 February 2013

Tagged withSyndicateDrupalApache Solr

Apache Solr provides a much higher performance search for sites with massive amounts of content when compared with what Drupal can do out of the box. It also provides what's known as “faceted” searching. In this example, the website has several different node types, and the search results need to be able to be filtered based on node type. The node types we're working with are Products, Accessories, Pages and Literature.

The Drupal apachesolr module comes with a built-in node-type facet, which will do this out of the box. Unfortunately, our needs are a bit more refined. We actually want products and accessory nodes combined into one filter, since they are very closely related. Also, Literature is actually composed of various types of literature, categorized by a taxonomy. One important category is User Manuals, which should be presented as its own tab.

Read more: www.opensourcery.com/blog/jessehs/creating-custom-apache-solr-facet