Solr now does faceted browsing out of the box

solr tools

Whereas earlier versions required custom code, a recent addition to Solr enables faceted browsing out of the box.

For example, adding the following parameters to your query. assuming you have "category" and "inStock" fields in your data:

facet=true facet.field=category facet.field=inStock

Adds something like this to the search results:

1 2 21 3 1

Showing which facets exist for the category and inStock fields, including result counts for each.

More details are available on the solr-user mailing list.

This is way cool, and comes right on time for my current project!