Facets Exposed Filters
When to Use
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.
Decision: Why Exposed Filters?
| 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 |
Pattern: Setup
- Enable modules:
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.)
Pattern: Filter Configuration
When you add a facet filter in Views:
- The facet entity is auto-created
- You configure processors directly in the filter settings dialog
- Widget type is controlled by BEF (not Facets widgets)
- AJAX is handled by Views AJAX setting
New in 3.0.4, the facet filter settings also carry:
- Ensure that only one result can be displayed — once an option is selected, only that option stays visible until it is deselected
- Depends on exposed filter — only render and apply this facet after the selected exposed filter has an active value; when that filter changes, this facet is cleared before the form is submitted (client side, via the
facets_exposed_filters/dependent_filterslibrary)
Pattern: 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 defaultsViewsAttachment— Search API display for View attachmentsExposedRangeSliderProcessor— New in 3.0.4. A facets processor (idexposed_range_slider, running atpre_queryandpost_query, weight 60) that supplies min/max range data to an exposed numeric facet. It only supports facets whose source offers arangequery typeExposedRangeSlider— New in 3.0.4. A Better Exposed Filters widget plugin (#[FiltersWidget(id: 'facets_exposed_range_slider')], extending BEF'sSliders) that renders such a facet as a noUiSlider range slider. It becomes applicable only once theexposed_range_sliderprocessor is enabled on the filterFacetsExposedFiltersHelper— New in 3.0.4. Request-scoped helper shared by the module's hook classes
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.
Decision: BEF + Facets Exposed Filters
With BEF as the exposed form style:
- Facet filters render as BEF widgets (checkboxes, radio buttons, links, sliders)
- Auto-submit works for facet filters
- Secondary options/collapsible work for facet filters
- Soft limit works for facet filters
Without BEF (plain exposed form):
- Facet filters render as standard dropdowns
- No auto-submit
- No enhanced widgets
Common Mistakes
- Not saving the View first — The facet source doesn't exist until the View is saved. You'll get a warning.
- Expecting block-based features — With exposed filters, facets are not blocks. They're part of the form. You can't place them in arbitrary page regions (use
configurable_views_filter_blockfor that). - Overridden display filters not supported — The docs explicitly state this: "Overridden display filters are not (yet) supported."