---
title: "How search facets work"
date: "2024-02-14T06:18:38+00:00"
summary: "Discover how search facets work to refine and sort search results efficiently. Learn to implement and customize facets using Apache Solr Search, enhancing user experience and content findability on your Drupal site."
image:
type: "page"
url: "/acquia-cloud-platform/how-search-facets-work"
id: "815db80f-a592-44d3-8d36-b822c7dc0ad5"
---

This document contains information about filtering search results with facets with the Apache Solr Search module.

Note

*   The [Apache Solr Search](https://drupal.org/project/apachesolr) module and related hooks are only available for Drupal 7.

*   The examples on this page require the **Apache Solr Search: Current Search** block to be enabled and displayed. To display the required search block, complete the steps documented on this page.

Search facets enable users to refine or sort their search result set. Users can begin with a general search and narrow down the result set as they understand better what content is available on your website. This topic gives some examples about how to use search facets. For more information, see [Configuring search facets](/acquia-cloud-platform/features/acquia-search/managing/relevant-results/facets/configure).

1.  In the admin menu, select **Structure**.
2.  Click the **Blocks** link.
3.  In the list to the right of **Facet API: Apache Solr environment: Acquia Search : Current Search**, click **Sidebar first**.
4.  Click **Save blocks**.

The Current Search Blocks module is part of the [Facets API](https://www.drupal.org/project/facetapi) module. For more information, see [How do I use the new Current Search Blocks module?](https://www.drupal.org/node/1375674) on Drupal.org.

Using facets in a search
------------------------

If you search for “drupal” in the search box of the example website with Apache Solr search running, you receive 9107 results. The large number of results aren’t useful for most purposes.

![Search example without facet](https://acquia.widen.net/content/9slawzt9we/jpeg/search_content-search.jpeg?position=c&color=ffffffff&quality=80&u=soxprt)

Filtering with search facets lets users drill down into the results until they find what they’re looking for. You can see the Apache Solr search module displays the number of each content type in the initial search results.

![Search filter by type facet example](https://acquia.widen.net/content/2hpdtzhgsl/jpeg/search_filter-by-type.jpeg?position=c&color=ffffffff&quality=80&u=soxprt)

Clicking on any term in a filter block narrows the search results to include only content that matches both the original and the newly selected search criteria. Narrowing the search to include only “Discussion” nodes reduces the result to 6034 nodes and adds “Discussion” to the facets list of the **Current search** block:

![Search current search facet example](https://acquia.widen.net/content/4utidxn80z/jpeg/search_current-search.jpeg?position=c&color=ffffffff&quality=80&u=soxprt)

Users can add other search filters until they find what they’re looking for or run out of search results.

If you click the minus sign ( `-`) link next to any search filter in a filter block, you remove the filter, which updates the search results to include all content matching the current filters.

### Filter block results example

This block is configured to display the top ten node authors sorted by the number of nodes they have created:

![Search filter block example](https://acquia.widen.net/content/ccmkx7c07z/jpeg/search_filter-by-author.jpeg?position=c&color=ffffffff&quality=80&u=soxprt)

Unless you change the default value, the **Show more** link at the bottom of the block displays 10 more authors (in order of contribution quantity) in the block list.