Skip to main content
1 of 2
Pontus Nilsson
  • 3.4k
  • 14
  • 22

I usually use Search API and Search API Solr. And for setting up the site layout I use Panels and Panels everywhere, so my answer will be using those modules. I'm not that familiar with Apache Solr Search but maybe it's doable with that module also. It would be interesting to hear other solutions :)

The fields you want to filter by could be built using Facet API. One thing that's pretty awesome is that the facets are shown depending on the search result. So the facet will only show filters that have results.

The tricky bit is that a facet can only be shown (as far as I know) by a query that has been run. To do this I would create a Search API view that uses you Search API index. Setup a views content pane that shows your search result. Then create a display of the type context in Views.

In your site template (setup using Panels everywhere) Insert the view by adding a pane and look under the "View context" category on the left. Insert the entire view. Then add your facets to the region you want them to show.

Pontus Nilsson
  • 3.4k
  • 14
  • 22