---
title: "Configuring search facets"
date: "2024-02-14T06:18:38+00:00"
summary: "Optimize your search functionality with customizable facets. Learn how to configure display settings, dependencies, filters, and caching for improved user experience and site performance."
image:
type: "page"
url: "/acquia-cloud-platform/configuring-search-facets"
id: "986b316a-09b5-4488-819b-767f7effd463"
---

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.

Search facets enable users to refine or sort their search result set. Users can begin with a general search and narrow down the results as they understand better what content is available on your website. To learn more about search facets, see the following:

*   [Filtering search results with facets](/acquia-cloud-platform/features/acquia-search/managing/relevant-results/facets)
*   [How search facets work](/acquia-cloud-platform/features/acquia-search/managing/relevant-results/facets/examples)

To enable search facets, you must install and enable the Drupal 7 [Facet API](https://www.drupal.org/project/facetapi) module.

If you are an administrator with search settings permissions, you can go to the **Apache Solr Search > Settings > Facets** tab and enable the facets you want to use in your search pages. The facets displayed on the **Facets** tab depend on the bundles and entities that you have enabled on your website, and the other search-related modules that you have installed. For more information, read [Modules for Acquia Search](/acquia-cloud-platform/features/acquia-search/getting-started/modules).

![Apache Solr Search settings facets screen](https://acquia.widen.net/content/d6w1yxh6dq/jpeg/search_enable-facets.jpeg?position=c&color=ffffffff&quality=80&u=soxprt)

Facet configuration operations
------------------------------

For each enabled facet, you can select the following operations:

*   [Configure display](#search-facet-config-display)
*   [Configure dependencies](#search-config-dependencies)
*   [Configure filters](#search-config-facet-filters)
*   [Export configuration](#search-export-config)

Configure display
-----------------

You can configure how each facet displays in the search results on the **Configure display** page. From the **Configure display** page, you can configure the following:

*   [Display widget](#search-facet-display-widget)
*   [Soft limit](#search-facet-soft-limit)
*   [Empty facet behavior](#search-empty-facet-behavior)
*   [Sort rules](#search-sort-rules)
*   [Global settings](#search-global-settings)

![Configure facet display settings](https://acquia.widen.net/content/dsope7lrso/jpeg/search_facets-config-display.jpeg?position=c&color=ffffffff&quality=80&u=soxprt)

### Display widget

The Facet API includes two basic _display widgets_: links and links with checkboxes. Other modules (such as [Facetapi Slider](https://www.drupal.org/project/facetapi_slider)) can provide other display widgets.

### Soft limit

The _soft limit_ limits the number of facets displayed initially. Other facets display after clicking the **Show more** link.

### Empty facet behavior

_Empty facet behavior_ controls the action to take when a facet has no items. The default is not displaying the facet if the search returned no items for the facet. You can select **Display text**, and then enter and format the text to display for an empty facet.

### Sort rules

You can configure how to sort the facets in the _sort rules_. Each sort rule can display in ascending or descending order, and can have a weight assigned to determine the order to apply the sort rules.

### Global settings

The _global settings_ for facet configuration apply to the facet across all realms.

#### Hard limit

The _hard limit_ displays no more than the configured number of items per facet.

#### Minimum facet count

The _minimum facet count_ displays facets matching in the configured number of documents. The default number is `1`. You can increase the number to delete some facets, even if they contain search result items.

Configure dependencies
----------------------

In order for the server to process facets, and display them to the user, dependencies must meet all conditions. Dependencies are based on either bundles or roles.

### Bundle-based dependencies

Using _bundle-based dependencies_, you can control whether a given facet must display based on the bundle (such as content type).

### Role-based dependencies

Using _role-based dependencies_, you can control whether a given facet must display to a user based on the user’s role.

Configure filters
-----------------

The **Configure filters** operation enables, disables, and weights facet filters created using search-related contributed and custom modules.

Export configuration
--------------------

Using the **export configuration** operation, you can view, copy, and paste a PHP version of the facet’s configuration. By exporting a facet’s configuration to code, you can use version control for the configuration, and export the configuration to other sites.

Block cache settings
--------------------

The **Apache Solr Search > Settings > Facets** tab also displays your Block cache settings. For best performance, enable block caching, which you can do on the **Administration > Configuration > Development > Performance** page. For more information, see [Page and block caching](../../../customizing/recommendation.html#search-page-block-caching) in [Creating content recommendation blocks](/acquia-cloud-platform/features/acquia-search/customizing/recommendation).