Magento Elasticsearch vs OpenSearch — Which Engine in 2026
Magento Elasticsearch vs OpenSearch compared — why Adobe switched defaults, which engine your version supports, and how to configure and tune catalogue search either way.
Magento Elasticsearch is not an optional add-on — since Magento 2.4.0, a search engine has been a hard installation requirement, and the store will not run without one. What has changed is which engine: Adobe moved the default to OpenSearch from 2.4.6 onward, following Elastic’s licence change. This guide covers the Magento Elasticsearch versus OpenSearch decision, which engine each Magento version supports, how to configure and reindex, and the tuning that actually affects catalogue search speed.
Search intent: informational/decisional — Magento developers and merchants choosing, configuring or migrating a search engine. We cover why the engine is mandatory, the licence split, version compatibility, configuration, reindexing, and performance tuning. It builds on our Magento 2 indexer guide and server requirements guide.
Magento Elasticsearch: Why a Search Engine Is Mandatory
Before 2.4, Magento could fall back to MySQL for catalogue search. That option was removed: from Magento 2.4.0 the MySQL search engine was dropped entirely, and a dedicated search service became a prerequisite for installation, per the Adobe search engine prerequisites. The reason is architectural — MySQL full-text search scaled badly on large catalogues, made faceted navigation (layered navigation) expensive, and struggled with relevance, synonyms and stemming. Moving to Magento Elasticsearch shifted catalogue search, layered navigation filters and search-term relevance onto an engine built for the job. In practice this means product search, category filtering and search suggestions all traverse the search cluster rather than hammering MySQL — a significant performance gain on any catalogue beyond a few thousand SKUs.
Magento Elasticsearch vs OpenSearch: The Licence Split
The split happened in 2021, when Elastic relicensed Elasticsearch away from Apache 2.0 to a dual SSPL/Elastic Licence model. AWS forked the last Apache-2.0 release and created OpenSearch, which remains fully open source. Adobe followed the ecosystem: Magento Elasticsearch support continues, but OpenSearch became the default and recommended engine from Magento 2.4.6, and it is what Adobe Commerce Cloud provisions. Practically, the two are close cousins — OpenSearch forked from Elasticsearch 7.10 and retains a largely compatible query API, which is why Magento can support both through the same module layer and why swapping between them is usually a configuration change plus a reindex rather than a rewrite. The OpenSearch project site and Elastic’s Elasticsearch documentation set out each project’s current direction.
| Factor | Elasticsearch | OpenSearch |
|---|---|---|
| Licence | SSPL / Elastic Licence | Apache 2.0 (fully open) |
| Magento status | Supported | Default from 2.4.6+ |
| Adobe Commerce Cloud | Legacy projects | Provisioned by default |
| Managed hosting | Elastic Cloud | AWS OpenSearch Service |
| Query API | Original | Forked from 7.10, compatible |
| Best for | Existing ES infrastructure | New builds, open-source policy |
Which do you actually pick? For a new Magento build in 2026, choose OpenSearch — it is the default, it is what Adobe tests against, and the Apache 2.0 licence avoids the SSPL question entirely. Stay on Magento Elasticsearch only when you already run Elasticsearch infrastructure or have a managed Elastic Cloud contract that makes reuse cheaper than migration.
Magento Elasticsearch: Configuration and Reindexing
Configuration lives in Stores → Configuration → Catalog → Catalog → Catalog Search, where you pick the engine, hostname, port, index prefix and timeout — or set it from the CLI, which is what you want in a repeatable CI/CD deployment. Getting the index prefix right matters if multiple environments share a cluster: staging and production must not collide on the same prefix, or one environment’s reindex will clobber the other’s data. After any engine change, a full reindex of the catalogue search index is required — the config change alone does not populate the new cluster.
# set the engine (opensearch or elasticsearch7) bin/magento config:set catalog/search/engine opensearch bin/magento config:set catalog/search/opensearch_server_hostname localhost bin/magento config:set catalog/search/opensearch_server_port 9200 bin/magento config:set catalog/search/opensearch_index_prefix prod bin/magento config:set catalog/search/opensearch_server_timeout 15 # verify the cluster is reachable before reindexing curl -s localhost:9200 | head # rebuild the catalogue search index, then flush bin/magento indexer:reindex catalogsearch_fulltext bin/magento cache:flush
Two operational notes. First, check bin/magento indexer:status after reindexing — a search index stuck in “processing” or reporting invalid usually means the engine is unreachable or the prefix is wrong. Second, keep the search index on Update by Schedule rather than Update on Save for any store with meaningful catalogue churn, so product saves queue an incremental update instead of triggering a synchronous reindex during an admin action.
Magento Elasticsearch Tuning: What Actually Helps
Once Magento Elasticsearch or OpenSearch is running, a handful of things drive real-world search performance. Give the cluster enough heap — the JVM heap should be roughly half of available RAM and generally not exceed ~31GB, and an undersized heap causes garbage-collection pauses that surface as slow, intermittent search. Run the engine on its own host once traffic grows, so it is not competing with PHP-FPM and MySQL for CPU. For multi-store setups, watch index count: every store view multiplies indices, and a cluster with hundreds of small indices spends more time on overhead than searching.
On the Magento side, the biggest wins are usually not engine tuning at all. Reduce the number of attributes marked searchable — every attribute with “Use in Search” enabled inflates the index and slows queries, and most catalogues have far more searchable attributes than they need. Similarly, attributes used in layered navigation should be genuinely filterable ones. Reviewing this list is often the single most effective Magento Elasticsearch optimisation available, and it costs nothing but attention. Our Magento team audits search configuration as part of performance work.
What we have learned running Magento search engines
The searchable-attributes list is where the wins hide. We regularly find stores with dozens of attributes flagged “Use in Search” that nobody searches on — every one inflates the index and slows queries. Auditing and trimming that list has repeatedly given us better search performance than any amount of cluster tuning, and it takes an afternoon.
Index prefix collisions cause the strangest bugs. Staging and production sharing a cluster with the same prefix produces symptoms that look like data corruption — products vanishing from search after an unrelated deploy. We set a distinct prefix per environment as a standing rule, because the failure mode is confusing enough to burn days.
Migrating Elasticsearch to OpenSearch is usually uneventful. Because OpenSearch forked from Elasticsearch 7.10 and keeps a compatible query API, the move is typically a config change plus a full reindex. We plan it as a maintenance task rather than a project, though we always rehearse on staging and confirm search results before switching production traffic.
Frequently Asked Questions About Magento Elasticsearch
Does Magento 2 require Elasticsearch?
Magento 2.4 requires a search engine — either Elasticsearch or OpenSearch. The MySQL search option was removed in 2.4.0, so the store will not install or run without one. From Magento 2.4.6 onward OpenSearch is the default and recommended engine, though Magento Elasticsearch remains supported.
What is the difference between Elasticsearch and OpenSearch for Magento?
OpenSearch is AWS’s Apache 2.0-licensed fork of Elasticsearch 7.10, created after Elastic moved to the SSPL/Elastic Licence. Functionally they are close cousins with a largely compatible query API, so Magento supports both. The practical difference is licensing and ecosystem — OpenSearch is Magento’s default from 2.4.6 and what Adobe Commerce Cloud provisions.
Should I use Elasticsearch or OpenSearch on a new Magento build?
Choose OpenSearch for new builds. It is the default from Magento 2.4.6, it is what Adobe tests and provisions on Commerce Cloud, and its Apache 2.0 licence avoids the SSPL question. Stay on Magento Elasticsearch only if you already run Elasticsearch infrastructure or have a managed Elastic contract that makes reuse cheaper than migrating.
How do I switch Magento from Elasticsearch to OpenSearch?
Point the engine configuration at the new cluster — via Stores → Configuration → Catalog → Catalog Search or bin/magento config:set — then run a full reindex of catalogsearch_fulltext and flush the cache. Because the query APIs are compatible, migration is usually a config change plus reindex. Rehearse on staging and verify results before switching production.
Why is Magento search slow even with Elasticsearch?
Common causes are too many attributes flagged searchable (inflating the index), an undersized JVM heap causing garbage-collection pauses, the engine competing for CPU with PHP-FPM and MySQL on one host, or a stale index. Audit the searchable attributes list first — on most stores it is the biggest and cheapest Magento Elasticsearch win available.
Can staging and production share one search cluster?
Yes, provided each environment uses a distinct index prefix. If they share a prefix, one environment’s reindex will overwrite the other’s indices, producing confusing symptoms such as products disappearing from search after an unrelated deploy. Setting a unique prefix per environment is a simple safeguard worth applying as standard.
Magento Search Slow or Due a Migration?
Our team configures and tunes Elasticsearch and OpenSearch for Magento — indices, attributes and cluster sizing.