Faceted search is a method of searching through data by using facets, I.e. attributes in the data, to gradually filter down a large selection of data to a smaller one that we are looking for.
Usually, the user of faceted search will write text in a search bar, and the faceted search UI will display all relevant data where the text occurs.
Then there will be some boxes with facets, that can be ticked to find the correct data.
You will have seen this on most web interfaces, e.g. Amazon
Above, we searched for ‘Moka’, and we then have some features we can use to filter, e.g. brand, cost, material, rating etc.
This tells us what kinds of items we can choose from, so looking for “Moka” might return ‘coffee maker’, but also ‘book’ (books about mokas), ‘coffee’ (coffee ground for mokas), ‘clothes’ (in the moka colour) etc.
This tells us the facets we can use to filter on, e.g. brand, material, condition.
3- Finally we want to see the actual items that are available matching our search parameters?
In SQL this would be much more complicated.
Furthermore, what if we want to go even deeper in our search?
Maybe we don’t care exactly what brand our moka is, so long as it’s Italian and from a small artisan brand.
IN SPARQL, this looks like this:
Of course, at every stage, we will want to see the facets that we can choose from when looking at brands. Not only that, because the available brands will already be filtered to brands that sell coffee makers, we will only see facets that apply.
So for coffee maker brands we might see if they adhere to certain workplace safety requirements for factories, but for food brands we might see if they signed a pact against, say, animal cruelty, which would make no sense for a coffee maker brand.
Hence our interface is completely data driven.