Migrating Elasticsearch to OpenSearch in Adobe Commerce (Magento 2): What Actually Changes?
A practical guide to migrating from Elasticsearch to OpenSearch in Magento: version compatibility, migration steps, and lessons learned in production.

Introduction
Adobe adopted OpenSearch as the official search engine for Adobe Commerce (Magento 2), replacing Elasticsearch. I participated in the migration of a Magento 2 production platform, and the question I heard most was: how big is this change?
At the infrastructure level, there's work to do. At the functional level, the end user notices no difference. But between those two realities lie compatibility decisions that, if ignored, can cost you days of debugging.
This article documents what I learned from the process: where the real risks are, which version of OpenSearch you need for your version of Magento 2 / Adobe Commerce, and what to validate before going to production.
Is OpenSearch Compatible with Magento?
Yes. Since 2021, OpenSearch has been the officially supported search engine for Adobe Commerce (Magento) catalog and product search, replacing Elasticsearch. The exact compatibility between OpenSearch and Magento depends on your version and patch level — the full matrix is further down in this article.
Why Did Adobe Commerce (Magento 2) Migrate to OpenSearch?
OpenSearch is a fork of Elasticsearch 7.10. It was born in 2021 when Elastic changed its license from Apache 2.0 to SSPL. AWS maintained the fork under an open license, and Adobe — along with other vendors — migrated its official support to OpenSearch.
For those of us working with Magento 2, this means Elasticsearch is no longer the recommended search engine. Starting from Adobe Commerce 2.4.8, Elasticsearch isn't even an option.
The OpenSearch 1 API is practically identical to Elasticsearch 7's. This makes the migration viable without functional changes to your Magento store, but it also creates a false sense of security: that the API is compatible doesn't mean any version of OpenSearch works with any version of Magento 2.
What Problem Does This Migration Solve in Magento 2?
There was no need to rewrite queries or change business logic. The problem was of a different kind: ensuring nothing would break on a Magento 2 platform processing product searches constantly.
The migration was an infrastructure change — replacing Elasticsearch with OpenSearch, pointing Magento to the new endpoint, and verifying that product search, layered navigation, and catalog indexing worked the same way. It sounds simple, but with a large catalog and active layered navigation, any inconsistency in indexing directly affects conversion.
Before touching any server, we needed to answer one question: which version of OpenSearch is compatible with my version of Magento 2 / Adobe Commerce?
Which Version of OpenSearch Does My Magento 2 Need?
This is the point where I saw the most confusion. Adobe Commerce (Magento 2) is not generically compatible with "OpenSearch" — the correct version depends on your release and your patch level.
Getting it wrong can generate silent problems: intermittent catalog indexing, incomplete search results, or a catalog that simply doesn't index.
OpenSearch — Magento 2 / Adobe Commerce Compatibility Matrix
| Adobe Commerce Version | OpenSearch 1 | OpenSearch 2 | OpenSearch 3 | Elasticsearch |
|---|---|---|---|---|
| 2.4.4 (original release) | ✅ | ❌ | ❌ | ✅ |
| 2.4.4-p17+ (recent patches) | — | ✅ | ❌ | ❌ Removed |
| 2.4.5 (original release) | ✅ | ❌ | ❌ | ✅ |
| 2.4.5-p16+ (recent patches) | — | ✅ | ❌ | ❌ Removed |
| 2.4.6 | Compatible | ✅ (recommended) | ❌ | ✅ |
| 2.4.7 | ✅ | ✅ | ❌ | ✅ |
| 2.4.8 | — | ✅ | ❌ | ❌ Removed |
| 2.4.9 | — | ✅ | ✅ | ❌ Removed |
Patch level matters. Adobe's official documentation shows the most recent patched versions (2.4.5-p17, 2.4.4-p18), which already support OpenSearch 2. But the original 2.4.4 and 2.4.5 releases only supported OpenSearch 1. Adobe backported OpenSearch 2 support in later patches. Always verify which patch level you have installed, not just the minor version.
What Does This Mean for Your Magento 2 Migration?
- Magento 2.4.4 or 2.4.5 without recent patches: you can only use OpenSearch 1. If you already have the latest patches (2.4.4-p17+, 2.4.5-p16+), you can go directly to OpenSearch 2.
- Magento 2.4.6: Adobe recommends OpenSearch 2 over OpenSearch 1.
- Magento 2.4.8 onwards: Elasticsearch is no longer an option. OpenSearch is mandatory.
- Elasticsearch 7.17 reached End of Support on January 15, 2026. If your Magento 2 still uses Elasticsearch, you're no longer receiving security patches for the search engine.
Before planning any migration, verify your exact Magento 2 version in the official system requirements documentation.
How to Migrate from Elasticsearch to OpenSearch in Magento 2?
The migration process in Magento 2 was:
- Provision OpenSearch with the correct version according to the compatibility matrix for your Magento version.
- Configure Magento 2 to point to the new endpoint — in
app/etc/env.phpor from the Admin Panel under Stores > Configuration > Catalog > Catalog Search. - Reindex the catalog (
bin/magento indexer:reindex catalogsearch_fulltext). - Compare search results between the previous Elasticsearch environment and the new OpenSearch one.
There were no changes to custom modules, search queries, or templates. Magento 2's abstraction layer handles communication with the search engine through the Magento_Elasticsearch module, and since OpenSearch APIs are compatible with Elasticsearch, everything worked without code modifications.
One important point: if you have third-party Magento 2 modules that connect directly to Elasticsearch without going through the framework's abstraction, those need review.
What to Validate in Magento 2 After Migrating to OpenSearch?
Validation was where we spent the most time. Search is one of the most critical features of any Magento 2 store — you can't assume that "if it compiled, it works."
- Product search in Magento: we tested by name, SKU, and product attributes. Not just happy paths — we included terms with accented characters, special characters, and partial searches that historically generated edge cases in the catalog.
- Category pages: we verified that products appeared in the expected order, respecting merchandising rules and sorting configured in the Magento Admin.
- Layered navigation: we confirmed that filters (price, size, color) showed correct counts and filtered properly. This is the feature that depends most on the search engine in Magento 2.
- Catalog indexing: we ran both full and partial
bin/magento indexer:reindex. We verified that times were comparable and there were no errors invar/log/. - Magento and OpenSearch logs: we reviewed
var/log/system.log,var/log/exception.log, and OpenSearch cluster logs looking for warnings or silent errors. - Performance: we compared search response times before and after. We weren't expecting improvements, but we needed to confirm there was no degradation in the store.
Everything passed without incidents. For the Magento store's end user, nothing changed.
Lessons Learned Migrating Magento 2 to OpenSearch
Verify the exact Magento version first. The first question before any migration to OpenSearch should be: which version does my Magento 2 / Adobe Commerce release support, including the patch level? Seems obvious, but I saw teams lose days assuming compatibility.
In Magento 2, it's an infrastructure change, not a code change. If your Magento implementation is standard (no direct Elasticsearch connections outside the framework's abstraction), the migration is transparent. If you have custom Magento modules that talk directly to the search engine, you need to audit them first.
Validation in Magento is not optional. That the migration is "simple" doesn't justify skipping tests. A silent regression in your Magento store's search results can take weeks to detect through conversion metrics.
Patch Magento before migrating. If you're on Magento 2.4.4 or 2.4.5, evaluate whether it makes sense to apply the latest security patches first. With recent patches you can go directly to OpenSearch 2, instead of migrating to OpenSearch 1 and then having to migrate again.
Elasticsearch already has a death date in Magento 2. Since Adobe Commerce 2.4.8, it's not even an option. With Elasticsearch 7.17's EOS in January 2026, staying on Elasticsearch means running your Magento store with a critical component that receives no security patches.
Conclusion
The migration from Elasticsearch to OpenSearch in Magento 2 / Adobe Commerce is simpler than it looks — if you do the preliminary work. Validate the OpenSearch version against your Magento version (including patch level), audit custom modules and integrations, and dedicate time to a complete validation of search, categories, layered navigation, and indexing.
The result in our case was the expected one: same functionality, same user experience, search engine aligned with Adobe's roadmap for Magento 2.
References
- System Requirements — Adobe Commerce — to verify which version of OpenSearch, PHP, MariaDB and other dependencies your specific version of Adobe Commerce supports, including patch level.
- Set up OpenSearch service — Adobe Commerce on Cloud (EN) — guide for configuring OpenSearch in cloud environments:
.magento/services.yamlfile, environment variables, and application relationship.