Magento 2 Elasticsearch vs OpenSearch: which should you use?
Key takeaways
- OpenSearch is the safer long-term choice for Magento 2.4.8 and later.
- Elasticsearch and OpenSearch perform similarly for standard Magento catalog search, but support depends on your Magento version.
- Magento 2.4.7 or older stores may not need to move now, but 2.4.8+ upgrades should plan for OpenSearch.
- Before switching, check compatibility, extensions, index prefixes, hosting support, and reindexing needs.
It can be frustrating when you’re not a technical person but reading very detailed information from big companies that make the software your online store uses. Let’s clear up some confusion for Magento 2 store owners!
The Magento 2 platform requires that a supported search engine be installed as a part of using the Magento platform. This fact is true whether it is the Adobe Commerce version or the Community Edition (also referred to as the Magento Open Source version) of Magento 2.
Host Magento at full throttle.
Get secure, reliable Magento hosting so you can scale faster.
Quick answer: should Magento 2 stores use Elasticsearch or OpenSearch?
For Magento 2.4.8 and later, use OpenSearch. Adobe Commerce 2.4.8 is optimized for OpenSearch and is no longer compatible with Elasticsearch, and Adobe recommends moving to OpenSearch for continued support and compatibility.
For Adobe Commerce on cloud infrastructure, follow Adobe’s supported OpenSearch path. Adobe states that Elasticsearch 7 and later is not supported for Adobe Commerce on cloud infrastructure, while Adobe Commerce versions 2.3.7-p3, 2.4.3-p2, and 2.4.4 and later support OpenSearch.
For Magento 2.4.7 or older on-premises stores, Elasticsearch may still work if your Magento version and search engine version match the supported requirements. If an upgrade is coming, OpenSearch is usually the safer planning choice.
Elasticsearch vs OpenSearch comparison
| Feature | Elasticsearch | OpenSearch | What it means for Magento 2 stores |
| Origin | Original search engine used widely across Magento 2 environments | Open-source fork of Elasticsearch 7.10.2 | Both come from the same search engine family |
| Licensing | Elastic changed licensing after earlier open-source releases | Apache 2.0 open-source license | OpenSearch gives hosting providers and merchants more flexibility |
| Magento 2.4.7 and older | May work depending on version support | Supported in several 2.4.x versions | Check exact Magento requirements before changing |
| Magento 2.4.8+ | Not supported | Supported path | Plan OpenSearch before upgrading |
| Adobe Commerce Cloud | No longer the supported cloud path | Supported path | Cloud stores should follow Adobe’s OpenSearch guidance |
| Standard catalog search performance | Strong catalog search performance when configured correctly | Similar practical performance for standard Magento catalog search | Version support and hosting fit often matter more than small benchmark differences |
| Hosting flexibility | Can involve more licensing and provider limits | More flexible for managed hosting options | OpenSearch may be easier to support long term |
| Migration planning | Existing Elasticsearch installs may continue on older supported versions | Best path for current and future upgrades | Test in staging before production |
What is Elasticsearch?
Elasticsearch is a Lucene-based search engine that Magento uses for catalog search, layered navigation, and product discovery. It helps Magento return search results faster than a basic database search, especially for stores with larger catalogs.
What is OpenSearch?
OpenSearch is an open-source fork of Elasticsearch. AWS created OpenSearch after Elastic changed the license for Elasticsearch, which changed how some hosting providers and cloud platforms could use and offer Elasticsearch.
OpenSearch now matters more for Magento because Adobe has moved current support toward OpenSearch, especially for 2.4.8 and later.
“OpenSearch project, a community-driven, open source fork of Elasticsearch and Kibana. We are making a long-term investment in OpenSearch to ensure users continue to have a secure, high-quality, fully open source search and analytics suite with a rich roadmap of new and innovative functionality. This project includes OpenSearch (derived from Elasticsearch 7.10.2) and OpenSearch Dashboards (derived from Kibana 7.10.2).” ~ Amazon Web Services Blog Post, April 21, 2021
Magento version compatibility: Elasticsearch vs OpenSearch
Use your exact Magento or Adobe Commerce version before choosing a search engine. Older tutorials may still mention Elasticsearch as the default, but current version support has changed.
For Magento 2.4.8 and later, OpenSearch is the supported direction, and Elasticsearch is no longer supported. For Magento 2.4.6 and 2.4.7, Elasticsearch may still apply in some environments, but you should confirm the official requirements for your exact version and patch level. For Adobe Commerce on cloud infrastructure, follow Adobe’s OpenSearch guidance, as cloud support shifted away from Elasticsearch earlier than many on-premises setups.
Before changing search engines, confirm your current Magento version, target upgrade version, hosting environment, third-party search extensions, and reindexing plan.
Licensing and hosting differences
Licensing is one of the biggest reasons this comparison exists. Elasticsearch licensing changes reduced some third-party hosting flexibility. OpenSearch kept the Apache 2.0 open-source path, which makes it easier for more providers and teams to support.
For Magento stores, this matters because search affects hosting, support, upgrades, and long-term compatibility.
How to choose and configure your Magento search engine
Open Catalog Search settings
Log in to your Magento Admin Panel.
Go to Stores > Configuration > Catalog > Catalog Search.
Select the search engine
Scroll down until you see Search Engine. Choose the option supported by your Magento version and hosting environment.
For older Magento versions, the option may reference Elasticsearch. For newer versions, especially 2.4.8 and later, choose OpenSearch where supported. Do not choose a search engine based only on an older tutorial or an old default setting.
Enter the hostname and port
Enter the server hostname and port for your Elasticsearch or OpenSearch service. Common hostname values include localhost, 127.0.0.1, a private IP address, or a service name. The common Elasticsearch and OpenSearch port is 9200, but some hosting environments use a proxy or custom port.
Set the index prefix
Use a unique index prefix when multiple Magento sites or environments share the same search service. This matters for staging and production environments, or for stores sharing one Elasticsearch or OpenSearch container.
A reused index prefix can cause one environment’s indexing process to affect another environment’s search index.
Add authentication details if needed
If your search service requires HTTP authentication, enable authentication and enter the correct username and password. Leave authentication disabled only when your environment doesn’t require it.
Test the connection and save changes
Click Test Connection to confirm Magento can reach the search service. If the test fails, review the hostname, port, authentication settings, firewall rules, and service status before trying again.
Reindex and clear cache after changing search engines
Reindex catalog search
If the Catalog Search index is set to Update on Save, it will have already triggered the reindex for the Catalog Search when you saved the changes to your catalog settings.
If it is set to Update by Schedule, it will reindex the next time the cron job is scheduled to run.
To manually reindex from the command line, go to the Magento root directory and run:

To reindex all indexers, run:

Refresh the full page cache
Go to System > Tools > Cache Management. Select Page Cache, confirm Refresh is selected, and click Submit.
If you need to clean cache from the command line, run this from the Magento root:

Only flush the entire Magento cache when needed. A full flush can slow down the site while Magento rebuilds cache, so schedule it for a lower-traffic window.
Migration considerations before switching to OpenSearch
Before switching from Elasticsearch to OpenSearch, confirm your Magento version, target upgrade version, search extensions, and hosting support. Some stores also need to review custom search behavior, third-party search extensions, and relevance settings.
Don’t migrate without testing. Search relevance, third-party extensions, index behavior, hosting configuration, cron, and reindexing should all be tested in staging before production changes.
Security note: Do not expose search services publicly
Elasticsearch and OpenSearch should not be open to the public internet. Use private networking, firewall rules, authentication, and hosting controls as appropriate.
Search services can contain catalog and index data. Public exposure can create security and performance risks.
When to ask for support
Ask for support when you’re upgrading to 2.4.8+, moving from Elasticsearch to OpenSearch, running shared search services, seeing failed connection tests, or managing a large catalog where reindexing affects performance.
Support can help review version compatibility, service status, index prefixes, resource usage, extension compatibility, and migration planning.
Elasticsearch vs Opensearch FAQs
Elasticsearch vs Opensearch next steps
Magento 2 search engine planning now depends heavily on your current version and upgrade path. OpenSearch is the supported direction for 2.4.8 and later, while some supported older stores may not need an immediate change.
Start by confirming your current Magento version, target upgrade version, current search engine, hosting support, and third-party search extensions before changing anything.
If search engine compatibility, OpenSearch migration, or reindexing affects a live store, explore Liquid Web Magento hosting.
Recent articles
- How to restrict Magento Admin Panel access in Cloudflare
- Magento Content Delivery Network (CDN) setup using Cloudflare
- Magento security patch: installing Magento 2.4.5-p1
- Elasticsearch containers: Liquid Web Cloud & the API
- How to enable Elasticsearch for your Liquid Web Cloud account
- How to configure Magento 2 to use Elasticsearch
Ready to get started?
Get the fastest, most secure Magento hosting on the market
Additional resources
How to write redirect (301) rules for Magento 2 →
Create Magento 301 redirect rules to preserve seo value.
Deep dive into the benefits of Magento search options →
Improve Magento store search to help shoppers find products faster.
How to configure Magento 2 storefronts →
Run multiple Magento 2 storefronts from one setup.
