Magento Open Source layered navigation and swatches

Configure filterable attributes, price navigation and color or size swatches in Magento Open Source, and plan the OpenSearch work that keeps storefront filters fast.

On this page

How Magento layered navigation and swatches shape product discovery

The core LayeredNavigation module renders filter options in the category and search sidebar, so shoppers can narrow a catalog by attributes such as size, color, brand and price. The core Swatches module replaces plain dropdown choices on configurable products with visual color and size swatches that also drive the product page. A team should implement both when shoppers must filter a large configurable catalog by variant attributes on a self-hosted store, and the default storefront controls are not enough. The 2.4-develop branch of the magento2 repository includes LayeredNavigation, Swatches and SwatchesLayeredNavigation, but the modules you deploy depend on your release, so confirm the exact version and the module list in your own installation before planning the work.

Filter quality depends on two things beyond the modules themselves. The first is attribute setup: an attribute must be marked as filterable in the catalog, its options must be clean and consistent, and the attributes that matter to shoppers (size, color, price) need a deliberate decision about which appear in the sidebar and in what order. The second is the search engine. Filters and search results are served from indexed data, so the search engine and its indexer must be configured and sized correctly before filters behave well under real traffic. Confirm which OpenSearch version your chosen Magento Open Source release requires, since Adobe's system requirements list it per release, and test filter performance on a catalog of realistic size before launch.

What the core layered navigation and swatch modules do

The core LayeredNavigation and Swatches modules shape how shoppers filter a catalog and choose configurable options. Each component below affects a different part of that path, so the catalog team and the storefront team need to agree on them before the build starts.

Filterable attribute navigation

The LayeredNavigation module builds filter options from product attributes that the catalog team marks as filterable, such as brand, material or fit. Shoppers use these filters on category and search pages to narrow results. Each attribute that becomes a filter adds index work and sidebar choices, so the team should keep the list short and tied to real shopping questions. Confirm in your release which attribute input types can appear as filters and how multiselect values behave.

Magento core modules

Price range navigation

Price navigation adds a price filter to the layered navigation sidebar so shoppers can narrow results by price band. The ranges shown depend on the catalog price data and the store's configuration, so the merchandising team should review them against real product prices after each major price change. Check how the filter behaves with tax display settings, customer group prices and catalog price rules, because shoppers may see different values than the list price suggests.

Swatch display for configurable options

The Swatches module replaces plain dropdown labels for configurable product options with color or image swatches, and it can show size or other options as text swatches. Shoppers see the choice on the product page and in listing pages, which helps them choose a variant faster. The catalog team must upload swatch images at the right size and set the option values correctly. Confirm how swatches render on listing pages in your chosen theme before you commit to a visual design.

Swatch and layered navigation integration

The SwatchesLayeredNavigation module connects swatch values to the filter sidebar, so a shopper who selects a color can filter the category by that color. This link depends on the attribute being both a swatch and a filterable attribute, and the two settings can drift apart when someone edits an attribute later. Test a filter on each category that uses swatches, and confirm the integration exists in the release you deploy because the module is part of the 2.4-develop branch.

Search index behind fast filters

Filters on a large catalog depend on the search engine and the indexers that feed it. Magento Open Source uses OpenSearch for catalog search, and the filter counts and results rely on fresh indexes. Slow or stale indexes make filters return incorrect counts or lag behind price and stock changes. Plan index refresh schedules and sizing with the operations team, and confirm the supported OpenSearch version against the system requirements for your Magento release.

Release-specific behavior to verify

Filter and swatch behavior can change between 2.4.x releases, and the storefront theme can change how options render. Adobe's system requirements and release notes list the supported stack for each release, so the team should read them before choosing a version. Build a test matrix covering each filter type, each swatch type, mobile layouts and the search results page, then repeat it after every patch. Confirm exact behavior against the release you deploy rather than relying on this overview.

How a shopper filter request reaches the search index

The diagram starts with a filter click in the storefront, which the LayeredNavigation module turns into a query against the OpenSearch index. Admin attribute settings and indexer runs feed that index, while full-page cache and the swatch renderer decide what the shopper sees after the results return. Check that filterable attributes are indexed after every change, and clear cache when a swatch or filter looks stale.

Filter click, OpenSearch query and swatch rendering, with indexer and cache inputs.

Which attributes and swatch types to configure, and when each fits

This table compares the filter and swatch options available to a Magento Open Source catalog team, with the fit, upkeep and pre-launch testing for each. Read each row as a decision: choose the option that matches the attribute's value count and buyer behavior, then budget the upkeep it creates.

OptionWhen it fitsUpkeep for the catalog teamWhat to test before launch
Attribute set as filterable in layered navigationAttributes buyers narrow by, such as material, brand or fit, with a stable and limited set of valuesEach new value must be entered or imported consistently, or it appears as a near-duplicate filter optionFilter counts on a sample category, and that values with no products are hidden as intended
Filterable attribute not exposed to storefront searchInternal specifications buyers do not need to filter on, such as warehouse codes or supplier referencesLow, but the attribute still needs correct values for feeds and admin reportsThat the attribute does not appear in the sidebar on any category page
Visual swatch (color or image)Configurable products where shoppers compare looks, such as color, pattern or finishSwatch images or colors must be uploaded per option and kept in step with new variantsSwatch display on product, category and search results pages, including missing images
Text swatchSizes, storage capacities or other short labels that shoppers scan quicklyLabels must match the attribute values exactly, so spelling changes ripple into every productOption order, availability of out-of-stock sizes and behavior on mobile layouts
Price navigation with ranges or stepsCatalogs where price is a primary decision factor and prices spread across a wide bandRanges need review when prices move, especially after promotions or currency changesPrice buckets against real catalog prices, including tax display settings and each currency in use
Limiting filters on large categoriesCategories with many products and many filterable attributes, where the sidebar becomes long and slowSomeone must decide which filters each category shows and revisit them as the range changesPage load and filter response on the largest categories, and that no filter hides the only path to a product
Filter index and search engine readinessAny store with more than a few filterable attributes or a large catalog, since filters rely on the search indexReindex after attribute changes and watch indexer status, which the operations team should ownFilter results after a full reindex on a staging copy that matches production data volume

Why filter speed depends on OpenSearch and the indexers

Magento Open Source sends storefront search and filter queries to a search engine rather than answering them from the main database, so the speed and accuracy of layered navigation depend on the search engine being installed, reachable and current. The 2.4.9 system requirements list OpenSearch 3 among the supported components, and Adobe supports only the listed combinations, so the first decision is which OpenSearch 3 minor version your team will run and how it is hosted. Confirm that version against the Adobe Commerce system requirements for the exact Magento release you plan to ship, because the combination must match what Adobe lists rather than whatever version your platform team already operates.

Filters only show what shoppers can use if the data behind them is current. Attribute values used as filters, the swatch data that drives color and size options on configurable products, and the product index that the search engine reads all have to be rebuilt after a catalog change. A filter that looks correct in the admin can still show stale options to shoppers until the relevant indexers have run and caches have been cleared. Ask the team which indexers run on schedule, which run on save, and who owns the cron job that keeps them current, because a missed cron run looks like a storefront bug even though the data was never refreshed.

Sizing is the other open question. Filter response times depend on catalog size, the number of filterable attributes, the number of configurable child products and the traffic the store expects at peak. Ask your team to confirm the OpenSearch node count, memory and storage they plan to allocate, how the cluster is backed up and monitored, and how a full reindex will be scheduled so it does not compete with peak trading. Those answers should be written into the scope before the build starts, since they determine whether swatches and price navigation perform acceptably under real load.

How a layered navigation and swatches rollout runs, step by step

This sequence takes filterable attributes and swatches from a catalog audit to a launched storefront, with a named output at each step so the team can check progress before the next stage begins.

  1. Audit catalog attributes and filter needs

    Review every product attribute in use, the attribute sets that carry them, and the categories shoppers browse. Merchandising and the store owner decide which attributes shoppers actually filter on, and the engineering lead confirms how each attribute is stored and whether it applies to configurable children. The output is an attribute map listing each attribute, its input type, its owning attribute sets, and the filter it will feed. The step is done when the business owner has signed off the map.

  2. Define filterable attributes and swatch types

    For each attribute on the map, set the storefront filter options in the Magento admin, including whether it appears in layered navigation and how its options are sorted. Attributes meant to render as color or image choices are converted to visual or text swatches, and the swatch values are entered once per option. Configurable product children must carry the swatch attribute values or the swatch will not match the parent. The output is a configuration record per attribute and a list of swatch values checked against the catalog. The step is done when a sample configurable product shows the expected swatches on a test category page.

  3. Configure price navigation

    Enable the price filter and confirm the price ranges the storefront will offer, along with the currency and tax display that the shopper will see in the filter. Because price filtering depends on the indexed price data, the team checks how catalog price rules and tax settings affect the values shown. The output is a written price navigation spec with the ranges, currency handling and the rules that alter displayed prices. The step is done when a test shopper sees filter ranges that match the prices on the product pages.

  4. Set up OpenSearch at the required version

    Install OpenSearch at the version that the Magento Open Source release supports, using the version listed in Adobe's system requirements for the release in use, and do not assume that a newer OpenSearch version is supported. Configure the Magento search engine settings, connection, index prefix and authentication for the environment, and confirm that the search node has the memory and disk the catalog size requires. Engineers should confirm the supported combination with Adobe before installation because Adobe supports only the listed combinations. The output is a running search cluster, a documented version record, and a successful connection test from the Magento admin. The step is done when a full reindex completes without errors.

  5. Test filter results and performance on staging

    Copy production configuration and a realistic product count to a staging environment that matches the production stack. Run a written test script covering each filter, combined filters, out-of-stock products, disabled products, multi-value attributes, and a category with few matching products. Measure filter response times under the expected traffic pattern and record slow queries. The output is a test script with pass or fail results, a performance log, and a list of defects with owners. The step is done when every critical filter passes and the performance results are accepted by the store owner.

  6. Fix defects and confirm indexing behavior

    Resolve the defects found in staging, then rerun the affected tests. Confirm which indexers must run after catalog or price changes, how often they run under the scheduled cron setup, and whether the reindex finishes within the maintenance window the business accepts. Check that the full page cache and any block cache do not serve stale filter counts after an update. The output is a verified indexer and cache schedule and a closed defect list. The step is done when two consecutive staging runs produce the same results.

  7. Release with an indexing and cache plan

    Prepare a launch checklist that includes the attribute map, the swatch configuration, the OpenSearch version record, the test results, the indexer and cache schedule, and the rollback steps if filters return wrong counts after release. Schedule the production change in a maintenance window, reindex after the configuration deploy, flush the relevant caches, and run the test script against production with test accounts. The output is a signed launch checklist and a post-launch check log. The step is done when the test script passes on production and the store owner confirms the storefront filters match the approved map.

How the setup differs for small, large and multi-store catalogs

A catalog with few configurable products usually needs a short list of filterable attributes, and the main risk is adding too many of them. Each filter adds options to the layered navigation sidebar, and shoppers on a small range often see more filters than products. Keep the filter set to the attributes that real shoppers use to narrow choices, such as color and size, and confirm that each swatch option maps to a value that actually exists on a product.

  • Limit filterable attributes: Mark only the handful of attributes that help a shopper decide, and leave descriptive attributes out of the navigation.
  • Check swatch coverage: Confirm every configurable child product has a swatch value, because a missing value can leave a blank or misleading option on the product page.
  • Keep price navigation simple: Test whether the default price ranges suit the catalog's spread, since a narrow price band can produce one or two ranges and little value.
  • Test the reindex path: Run the indexers after changing attributes and confirm the filters update without a long wait, because a full reindex on a small store is usually quick.
  • Watch empty filter results: Check that options with no matching products do not appear or do not return an empty listing.

Before launch, walk the storefront on desktop and mobile and confirm every filter returns products you expect.

What drives the effort and cost of filter and swatch work

This table lists the factors that raise or lower the effort of layered navigation and swatch work, how to keep each one under control, and what to request in a written quote. Read it before scoping, because most of the variation in effort comes from catalog structure and image production rather than from the modules themselves.

DriverWhy it changes effortHow to keep it downWhat to ask for in a quote
Configurable products and optionsEach configurable product generates child SKUs, and every swatch option needs mapping, images and indexing checks. Counts multiply quickly across a catalog.Limit swatches to attributes shoppers filter on. Consolidate near-duplicate options before import.Stated count of configurable parents, child SKUs and swatch options in scope, with the import method.
Filterable attributesEach attribute set to filterable adds a facet to test, a display rule to set and an index to rebuild after changes.Start with a short list tied to real shopper searches. Add facets later after reviewing usage.Named list of filterable attributes, their display type and whether any need custom sorting.
Category depth and anchor settingsAnchor categories and deep trees change which products each facet covers, which increases test cases and makes results harder to verify.Flatten the tree where possible. Use anchor settings only on categories that need them.Category count and depth, and which categories are anchor categories.
Number of stores, websites and localesEach store view needs its own labels, swatch text, price display and index coverage. Translation review adds a separate pass.Keep attribute labels in one source file. Translate only the storefronts launched at go-live.Number of store views, languages, currencies and whether translations come from the client or the vendor.
Swatch image productionColor and pattern swatches need consistent images, sizing and alt text. Image sourcing is often the slowest task and is frequently not in the developer's scope.Agree the image specification early. Use a single color source for hex values where possible.Who produces images, the file specification, the number of images, and whether alt text is included.
Custom filter logicPrice sliders, multi-select rules, custom sorting or extra facet types require custom modules and more regression testing, and they can conflict with upgrades.Use core layered navigation settings first. Keep any custom filter in a separate, documented module.Written list of custom behaviors, the module that will hold them, and the upgrade test plan.
OpenSearch hosting and tuningFilters depend on the search engine. Hosting choices, sizing, TLS, access control and reindexing windows all affect cost and effort. Adobe's requirements list OpenSearch 3 for the 2.4.9 line.Confirm the OpenSearch version against Adobe's system requirements for your release. Size the cluster from catalog and traffic figures, not guesses.Hosting model, OpenSearch version, node count, backup approach, monitoring, and who owns tuning after launch.
Ongoing maintenanceEach Magento patch can touch search and swatch code, and OpenSearch releases move through maintenance on their own schedule. Both recur for the life of the store.Track Adobe's patch releases and OpenSearch's maintenance status. Test filters on every upgrade.Retainer or support terms, how regression tests are run, and which party applies patches.

How filters connect to the rest of the store

Layered navigation and swatches read product, attribute and index data that several other systems produce or serve. Each connection below changes how filters behave, so the team building them needs to know who owns each piece before the build starts.

OpenSearch and its security settings

Magento Open Source uses OpenSearch to answer filter counts and fast faceted queries, so the search cluster sits on the critical path for every category page. Confirm the OpenSearch version against Adobe's system requirements for your Magento release, since Adobe supports only the listed combinations. Then agree who owns TLS between Magento and the cluster, index access credentials, and whether the cluster is reachable only from application nodes.

Required for 2.4.9
OpenSearch 3
System requirements

Product catalog and attribute sets

A filter exists only where an attribute is set as filterable and appears in the attribute set used by the product. Swatch display depends on attribute input types and on how configurable products link their child simple products. Ask the merchandising lead to confirm the attribute list, value naming and which attributes are shared across attribute sets, because renaming a value later can split filter counts.

Varnish or other full-page caching

On self-managed installs, Adobe documents Varnish as the full-page cache accelerator, so filtered and swatch-driven category URLs pass through it. Filter parameters multiply cacheable URLs, which affects hit rates and cache size. Confirm with the platform owner which query parameters are cached, how cache is purged after an index or price update, and whether swatch changes reach shoppers without a stale page.

Listed for 2.4.8-p5
Varnish 8
Varnish cache guide

Theme and storefront front end

Layered navigation and swatch markup are rendered by the theme, so a custom theme or a move to another front end changes the filter sidebar, swatch templates and JavaScript behavior. Decide early whether the store stays on the default theme or a custom one, and test filter interaction on mobile widths. Confirm that any third-party theme or extension that alters category listing has been checked against the filter templates.

ERP and PIM product data feeds

Attribute values, option labels, swatch images and stock status often arrive from a PIM or ERP rather than from manual entry. If the feed changes a value name or sends a new option, filters can gain duplicate entries or lose products until indexers finish. Agree the source of truth for attributes, the import schedule and the rule for retiring old option values with the team that owns the feed.

Indexing and performance work

Filter counts and price ranges depend on indexers, and large catalogs with many filterable attributes take longer to reindex and consume more search capacity. Ask the operations owner how indexers run on the cron schedule, whether an index refresh is needed after bulk attribute changes, and what monitoring shows a stale or failed index. Check the performance plan before adding more filterable attributes to a large catalog.

Questions teams ask before hiring help with layered navigation and swatches

How much effort does layered navigation and swatch setup take?

Effort depends mostly on the attribute model and the number of filterable attributes, not on the swatch feature itself. A catalog with a few clean color and size attributes is a small configuration task, while a catalog with dozens of overlapping attributes, custom price ranges and category-specific filters needs modeling, testing and indexing work. Ask any partner to break the effort into attribute design, configurable product checks, storefront theme work, search engine configuration and testing, so each part can be priced against the written scope. Work on the catalog data itself, such as normalizing attribute values, is often the largest unplanned item.

How long does this work typically take, and what changes the timeline?

The timeline is set by the catalog and the theme, not by the modules alone. Duration grows with the number of attributes to review, the amount of product data that needs cleanup, how many storefront templates must show swatches correctly, and how many environments must be tested before launch. Ask for a schedule that shows when catalog decisions must be signed off, because those decisions often block development. Any date should be tied to a written scope and to the Magento Open Source release line the store runs on.

What does our team need to provide before work starts?

Plan to provide a list of filterable attributes with the business reason for each, sample product data for the attributes that drive swatches, the category structure, and the storefront design for filter panels and swatch display. You will also need access to a staging environment that matches production, a named person who can approve attribute values, and someone who can confirm how search results should behave for customers. Missing answers on attribute meaning usually cause rework later, so resolve them before the build starts.

Can an in-house developer set this up alone?

An experienced in-house Magento developer can usually configure filterable attributes and swatches alone for a small catalog. The work becomes harder when the team must also tune indexing, customize the frontend, and test configurable products across many variants. Check whether your developer has worked with the core LayeredNavigation and Swatches modules, the Magento indexers, and the search engine settings your edition requires. A short review by a second engineer before launch is a common way to reduce risk without a full outsourced build.

Do we have to run OpenSearch ourselves to get fast filters?

Magento Open Source relies on a search engine for catalog search and filtering, and OpenSearch is the engine to plan for in a self-hosted store. You can run it on servers you control or in a managed setup within your own cloud account, but the operating responsibility stays with your team. OpenSearch is released under the Apache License, Version 2.0, and the OpenSearch FAQ does not describe a paid edition, so licensing is not the main cost driver. Confirm the required OpenSearch version against Adobe's system requirements for your Magento release, because Adobe supports only listed combinations.

How do we keep filters fast after launch?

Keep filters fast by limiting the number of filterable attributes, monitoring indexer status, and testing search response times after every catalog change. Schedule index rebuilds and cron jobs as part of normal operations, and watch search cluster health, memory and storage. Review the list of filters each quarter, since every new attribute adds indexing work. Confirm your monitoring and backup plan for the OpenSearch cluster before launch, because a search outage stops the catalog from filtering at all.

What changes when the store upgrades to a newer release?

Upgrades can change the search engine version, PHP and database requirements, and the behavior of core modules that handle filters and swatches. Adobe's upgrade guide recommends applying each patch cycle to stay secure and says customizations, extensions, third-party integrations and coding practices drive upgrade effort. Before any upgrade, check the required OpenSearch version in the system requirements for the target release, run the Upgrade Compatibility Tool, and retest filter and swatch behavior in staging. Ask for an upgrade plan that covers the search engine as well as the Magento code.

How DeployOpen scopes, builds and supports layered navigation work

DeployOpen plans and builds Magento Open Source layered navigation and swatches inside your own infrastructure, starting from a written scope of attributes, filters and swatch rules. We test the storefront filters and the OpenSearch behavior behind them, then hand over documentation your team can run.

How we scope

  • Engagements are fixed-scope, with filterable attributes, price ranges and swatch attributes agreed in writing before work starts.
  • We inventory which configurable products, attribute sets and categories need swatches and which filters shoppers will actually use.
  • The written scope names the Magento Open Source version, the search engine version and the front end the work targets.

How we build

  • We configure the core LayeredNavigation and Swatches modules and set attribute filter visibility and sort order in the admin.
  • We test filter combinations, swatch display for color and size options, and price navigation against the indexed catalog.
  • We check OpenSearch index health, reindex timing and search settings, and confirm the setup runs on the PHP, OpenSearch and Redis or Valkey versions Adobe lists for your release.

How we hand over

  • Handover includes a configuration record listing filterable attributes, swatch attributes, price navigation settings and index dependencies.
  • We document the reindex and cache-flush steps your team runs after attribute or catalog changes, with the commands used in your environment.
  • Deliverables include a test log of filter and swatch cases, so your team can repeat the checks after upgrades.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers, covering filter behavior after each patch cycle.
  • We retest layered navigation and swatches after Magento patches and OpenSearch version changes before those changes reach production.
  • Confirm with us during scoping which support level, response channel and testing cadence your team needs for the retainer.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.