Check your version

This video covers a topic in Drupal 7 which may or may not be the version you're using. We're keeping this tutorial online as a courtesy to users of Drupal 7, but we consider it archived.

Alternate resources: 

Narrow Search Results with Facets

Video loading...

Join Drupalize.Me to watch this video

Join today and gain instant access to our entire video library.

Log in Sign up
  • 0:03
    I want to talk about using facets with our search results.
  • 0:07
    Using facets allows users of your search application to further narrow the results returned
  • 0:12
    from a key word search by selecting one or more attributes of the returned content and saying,
  • 0:17
    "Either show me only the things that have this dimension or show me all of the things
  • 0:22
    that don't have this particular dimension."
  • 0:25
    In this tutorial, we'll take a look at some examples
  • 0:28
    of faceted search so that we can get an idea of what it is that we're trying to create.
  • 0:32
    And then we'll use the Facet API
  • 0:35
    contributed module in order to create facets that will work with our Search API-powered search.
  • 0:43
    The goal here is to configure facets for

Narrow Search Results with Facets

Loading...

Using facets allows users of your search application to further narrow the results returned from a keyword search by selecting one or more attributes of the returned content and saying either show me only these, or show me everything but these. In this tutorial we'll take a look at some examples of faceted searching in practice, and then we'll use the Facet API module to expose facets for our genus and species fields.

One of the most common uses of facets is on e-commerce sites like Zappos.com that have huge collections of products that users can browse through, and narrow down, to focus in on exactly the pair of shoes they are after. In this example facets allow you do to things like narrow the results returned from your initial keyword search to just shoes for men, which are brown, size 10.5, and on sale. You can can also see faceting in action any time you perform a search on our site.

We'll use facets to allow users of the fish finder application to limit the results returned to just those of a specific species or genus. In doing so we'll also look at the options available for determining how facets should be displayed, whether or not we should show a facet that has zero documents in our result set, and how to combine multiple facets together into a single query using either AND or OR logic.

By the end of this tutorial you should be able to use the Facet API module in conjunction with Search API in order to provide facets that your users can use to further narrow and refine their search results.

Downloads: 
Log in or sign up to download companion files.
Additional resources: