I have recently completed a port of the BoboBrowse faceted search engine (called BoboBrowse.Net) that is built on top of Lucene.Net. It is open source and available on NuGet.
Since it works on top of Lucene.Net, you just need to provide the facet data in a Lucene.Net index which can be built by using the built-in Lucene.Net tools, or you could potentially extend the Directory class to pull the data directly from SQL Server.
Then you just need to set up facet handlers and perform a browse against the index. The browse engine takes care of several details for you, such as:
- Performing the search based on a Lucene.Net query (or it will match all records so you can browse them all).
- Listing the facets.
- Listing the facet values (either the matching ones, or you can expand all of them).
- Listing the facet value counts.
- Sorting the facet values.
- Selecting facet values (for drilling down into the results).
- Listing the results.
- Paging the list of results.
- Sorting the list of results.
- Formatting the facet data for display in the results (based on the culture).
There are also several specialized facet handlers (simple, path, range, dynamic time range, multi-value, geo, histogram, etc.) and you can extend the framework to build your own, if needed.