Skip to main content
Signature

Explore example code

Browse the Filter Map example code on GitHub.

About this widget

Components holding a map of filters, and that can apply a single filter at a time.

Examples

Swift

Low-level API

If you want to fully control the Filter Map components and connect them manually, use the following components:
  • Searcher. The Searcher that handles searches.
  • FilterState. The current state of the filters.
  • FilterMapInteractor. The logic applied to the filter map.
  • FilterMapController. The view that renders the filter map.
Swift

Parameters

HitsSearcher
required
The Searcher that handles your searches.
FilterState
required
The FilterState that holds filters.
[Int: Filter]
required
The map of filters to be held. The key is an unique identifier for the filter value.
Swift
Int
required
The key of the filter selected by default.
Attribute
required
The attribute to filter.
RefinementOperator
required
Whether facets are combined with and or or behavior in filterState. For example if you select color as the attribute and an or behavior, the filter sent to Algolia is color:red OR color:green.
String?
default:".none"
Filter group name.

Controller

SelectableSegmentController
required
The view that renders the filter map.
default:"DefaultPresenter.Filter.present"
How to display filters.
Swift
Last modified on July 22, 2026