Facets Exposed Filters
When to Use
Use facets_exposed_filters when you want facets integrated into the Views exposed form — the recommended approach in Facets 3.x. This gives you native Views AJAX, BEF widget support, and simpler configuration. Use block-based facets only when you need to place facets in arbitrary page regions (sidebar, Layout Builder).
Decision
| Feature | Block-Based (2.x) | Exposed Filters (3.x) |
|---|---|---|
| AJAX support | No | Yes (native Views AJAX) |
| Configuration | Separate facet admin | Directly in Views UI |
| Multiple displays | Must recreate per display | Shared across displays |
| Widget control | Facets widgets only | BEF widgets (checkboxes, links, sliders) |
| Layout flexibility | Place blocks anywhere | In the exposed form area |
| Processors | Full processor support | Full processor support |
| Performance | Separate query overhead | Single Views query |
BEF integration:
| With BEF | Without BEF |
|---|---|
| BEF widgets (checkboxes, links, sliders) | Standard dropdowns |
| Auto-submit | No auto-submit |
| Soft limit, secondary panel | No enhanced widgets |
Pattern
drush en facets_exposed_filters better_exposed_filters
- Create a View using a Search API index
- Save the View (critical — source must exist before facets can find it)
- In the View, add a Filter Criteria → look for the "Facets" category
- Select the field you want to facet on
- Configure the facet processors in the filter settings
- Optionally: Change the View's exposed form style to "Better Exposed Filters"
- Configure BEF widgets per filter (checkboxes, links, etc.)
Sub-module architecture — facets_exposed_filters provides:
- FacetsFilter — A Views filter plugin (src/Plugin/views/filter/FacetsFilter.php)
- ViewsDefault — Search API display plugin for Views defaults
- ViewsAttachment — Search API display for View attachments
The FacetsFilter acts as a bridge: it appears in the Views UI as a standard filter but internally creates and manages a Facets facet entity.
Common Mistakes
- Wrong: Creating facets before saving the View → Right: The facet source doesn't exist until the View is saved.
- Wrong: Trying to place exposed filter facets in arbitrary page regions → Right: With exposed filters, facets are part of the form. Use
configurable_views_filter_blockfor arbitrary placement. - Wrong: Using overridden display filters with facets_exposed_filters → Right: "Overridden display filters are not (yet) supported."