a. Background

Before we start I will go through a little background on what faceted search is and where Solr fits into this. If you already know about faceted search – you can skip this part and move on to the next page – see the menu on the right.

Basic Keyword Relevance Search

The best example of this is Google. Everybody knows it. This is a screenshot from the UK site:

Note that you can semi-refine your search results by clicking on a radio button to search either the entire web, or just UK based sites. There is also the advanced search interface which will allow you to narrow down the results to just a specific URL, file type and change the keyword query into a phrase match, ignore specific words etc – this is not faceted search per se.

So here are the results listed in relevance order for the keyword query ‘solr’1.

As you can see, there is a list of results, Google has integrated other information to the search results – you can see a NASDAQ stock quote for ‘SOLR’, a list of sub-links under the Apache Solr project page and so on. This is not faceted search.

Faceted Search

To understand faceted search, I will be looking at a Job Board in Australia called CareerOne2. Or perhaps you want see an example of their faceted search for the keyword ‘Java’.

Having a look at the screenshot below:

I have marked out the areas of interest from top to bottom, left to right.

Current query/Refinements

In this space is where the current keyword query is displayed. Although not shown, underneath this would display a list of all of the selected refinements – sort of like a search breadcrumb display. Note the ‘Remove’ link which is like an ‘undo’ feature for the results.

NOTE: There is a difference between a Keyword parameter and a Facet parameter. The keyword is used to search against the text of the search index, the facets are used to refine the keyword search, thereby narrowing down the results.

Refinement Facets

For the current query keyword of ‘Java’ a list of all of the available facets are listed along with the number of results that can be expected.

NOTE:As a side example, when you click on the ‘Industry’ facet in the above example, a new facet is introduced – that of subcategory as seen below. This is known as hierarchical faceting.

Search Interface

The (advanced) search interface is included here to show how instead of doing just a

Result MetaData

It is useful for the user to know how many results have been returned, and how many are displaying per page – this also links to the pagination below.

Sorting Options

The user may want to sort by relevance (based on keyword) or on the date posted. In other examples, you may wish to order by the price of something, number of stars rating or even length/height/width of the item.

Pagination

Being able to paginate through results is an obvious requirement

Result Details

The actual details of the hits on the index. Note that other metadata (from the facet information) is also included:

  • Title
  • Location
  • Source
  • Date Posted

The Good News

The good news is that Solr does all of this for you and with ease. It may look daunting at the moment, but it will be plain sailing to get all of this done.

Wrap-up

And that is faceted search, on to the brief history of Solr and the setup.

Footnotes:

  1. What else would it be?
  2. Disclaimer: I worked on the CareerOne Site, including integration of the FunnelBack Faceted Search Engine.

Like my footnotes?
Want to add footnotes to your blog?
They can be added easily to your WordPress installation