Faceted Search Under Active Filters with Manticore Search
A deep dive into the facet_filter_mode feature in Manticore Search 25.12.0 designed to handle online store filter panels efficiently.

Stock photo for illustration only, not from the actual event
- Manticore Search 25.12.0 introduces facet_filter_mode for the facet API.
- Supports three filter inheritance modes: strict, auto, and max.
- Enables filter panels to directly display selected, available, or unavailable statuses.
- Reduces backend complexity by eliminating the need to manually build separate queries.
Facets in an online store seem simple until the first filter is selected. In a catalog, they function as navigation tools. A chosen color should remain visible, and other colors should stay available so users can switch or broaden their selection. Options with no matching products are most useful when indicated as unavailable. Within a single facet, OR logic usually applies, while AND logic applies across different facets such as brand, color, and size simultaneously.
The challenging part begins after the initial selection. Imagine a catalog where a user has picked a specific brand, color, and size. The main result set must narrow down to match all three conditions, but the filter panel requires different rules. It must preserve the chosen color while presenting alternative colors that remain accessible under the same brand and size.
Manticore Search version 25.12.0 introduced facet_filter_mode, transferring this behavior directly into the facet API. Queries can now define how a store's filter panel should behave without requiring the application to manually construct nearly identical queries for every single facet.
This feature is a major win for e-commerce developers. Calculating remaining filter options under active user selections traditionally requires writing complex, fragmented SQL queries for every attribute. Having the search engine handle this natively at the API level significantly reduces application overhead and speeds up frontend responsiveness.
The facet_filter_mode parameter handles the most common problem of recalculating facets after multiple filters are active. It provides three distinct filter inheritance modes:
Facets now support three distinct filter inheritance modes:
- strict: Every facet receives all filters directly from the main query.
- auto: Keeps every filter except the specific filter on the facet currently being calculated.
- max: Calculates buckets over the base result set and marks their status separately for the interface.

Stock photo for illustration only, not from the actual event
Consider a small catalog example containing brand_id, color_id, and size_id. When a user selects brand_id = 7 AND color_id = 1 AND size_id = 10, the strict mode yields an extremely narrow result. However, switching to auto mode labels the active choice as selected and alternative options as available.
Furthermore, the max mode goes a step further by evaluating buckets over the base result set with explicit status markers. These identical options are also fully accessible in the JSON API through parameters like facet_filter_mode, mode, filters, exclude_filters, and zeroes: true.
Source: Dev.to
Found something wrong in this article? Report an issue with this article
Comments
Leave a Comment