Why Elasticsearch is required for Magento 2.4
Key takeaways
- Magento 2.4 removed MySQL as a supported catalog search engine, so stores need Elasticsearch or OpenSearch.
- Elasticsearch powers catalog search, product discovery, layered navigation, filtering, and search relevance.
- Magento 2.4 upgrades should confirm search engine availability before installation or deployment.
- Search is now part of the Magento hosting stack, not just a Magento Admin setting.
When Magento 2.4 was introduced in July 2020, Elasticsearch became a requirement for the setup or upgrading of Magento. Older hosting environments will need updating prior to upgrading. This allows you to take advantage of improved search features and performance.
In this article, you will learn more about what Elasticsearch does, why it’s required, and how to use it for Magento 2.4.
Host Magento at full throttle.
Get secure, reliable Magento hosting so you can scale faster.
What changed in Magento 2.4?
Magento 2.4 changed how catalog search works. Before Magento 2.4, stores could use MySQL as the default catalog search engine. In Magento 2.4, MySQL catalog search is no longer supported, so the store needs Elasticsearch or OpenSearch as the catalog search solution. Adobe’s current documentation states that all Adobe Commerce 2.4 installations must use Elasticsearch or OpenSearch for catalog search. That means search is no longer optional infrastructure.
Why Magento 2.4 requires Elasticsearch
Magento 2.4 requires Elasticsearch because product search, filtering, and category navigation are core parts of the shopping experience. If the search engine is missing or not working, the storefront may have search, indexing, or catalog display problems. In Magento 2.4, search is part of the required hosting stack, not just a Magento Admin setting.
What Elasticsearch does in Magento 2.4
Elasticsearch helps Magento return more relevant product search results by indexing store content and retrieving matches quickly. It can handle searches with broad terms, typos, different word order, capitalization differences, and stopwords.
In Magento 2.4, Elasticsearch supports product search, product indexing, layered navigation, filtering, search relevance, and larger catalogs that need faster search performance. It also helps reduce search load on the database.
Elasticsearch vs MySQL search in Magento
| Search option | Role in Magento 2.4 |
| MySQL catalog search | Removed as a supported catalog search engine in Magento 2.4 |
| Elasticsearch | Required for earlier Magento 2.4.x versions and widely used for catalog search |
| OpenSearch | Supported in newer Magento/Adobe Commerce versions depending on version and environment |
The practical takeaway is simple: if you’re moving to Magento 2.4, don’t assume the older MySQL search setup will still work. Search engine readiness needs to be part of the upgrade plan.
Elasticsearch vs OpenSearch
The original Magento 2.4 requirement centered on Elasticsearch. Adobe’s current documentation now references Elasticsearch or OpenSearch depending on the Commerce version and deployment environment. Version 2.4.4 and later require either Elasticsearch or OpenSearch as the catalog search engine, while earlier 2.4.x versions required Elasticsearch.
OpenSearch support was added in Adobe Commerce 2.4.4, and Adobe describes it as a compatible fork of Elasticsearch.
For this article, Elasticsearch remains the main focus because the original Magento 2.4 requirement and keyword intent center on Elasticsearch. However, stores on newer Adobe Commerce or Magento environments should confirm whether Elasticsearch or OpenSearch is supported for their version and hosting setup.
Magento Admin configuration overview
After the search service is installed and available, Magento needs to connect to it. In Magento Admin, search engine settings are generally found under:
Stores > Settings > Configuration > Catalog > Catalog Search
Common Magento search engine configuration fields
| Field | What it means |
| Search engine | Elasticsearch or OpenSearch option available for the version |
| Server hostname | Hostname or IP address for the search service |
| Server port | Search service port, often 9200 |
| Index prefix | Prefix used for Magento search indexes |
| Enable HTTP auth | Used if authentication is required |
| Username/password | Credentials for a protected search service |
| Server timeout | How long Magento waits for a response |
| Test connection | Confirms Magento can reach the service |
Adobe’s search engine configuration guide also lists the Admin path as Stores > Settings > Configuration > Catalog > Catalog > Catalog Search.
Troubleshooting Elasticsearch in Magento 2.4
If Elasticsearch is missing, down, misconfigured, or blocked, Magento search may not work correctly. You may see failed test connections, indexing errors, missing search results, or category and layered navigation issues.
Common effects include catalog search failing, category pages not showing expected products, layered navigation not working correctly, reindexing failures, Admin test connection errors, or installation and upgrade issues when the required search service is missing.
Start by checking the basics. Common causes include the wrong host, wrong port, a search service that is not running, firewall rules blocking the port, authentication mismatches, unsupported Elasticsearch/OpenSearch versions, the wrong search engine selection, missing reindexing after configuration, or cache that has not been cleared.
Post-configuration checklist
After configuring Elasticsearch or OpenSearch, confirm the search setup works before relying on it in production.
Check that:
- The Magento Admin test connection works
- Catalog search reindexing completes
- Magento cache is flushed
- Storefront search returns expected results
- Category pages load expected products
- Layered navigation works
- Autocomplete or search suggestions work if used
- Search logs don’t show connection errors
Hosting and performance considerations
Elasticsearch improves Magento search, but it still needs the right resources and configuration. Search performance can depend on memory, CPU, disk, service availability, monitoring, firewall rules, authentication, and version compatibility.
Liquid Web Managed Magento hosting can support services like Elasticsearch, RabbitMQ, Solr, and Varnish when your store needs them. These services should be sized with the right resources for your site, without making the server setup harder to manage than necessary.
Security considerations
Elasticsearch or OpenSearch should not be exposed publicly without proper controls. Keep access restricted, use firewall rules, apply authentication where appropriate, monitor logs, and work with hosting support when you are unsure how the service should be secured.
Keep search infrastructure private unless there is a clear, secured reason to expose it.
Magento 2.4 search engine FAQs
Getting started with Elasticsearch for Magento 2.4
Magento 2.4 requires a supported search engine because MySQL catalog search is no longer supported. Elasticsearch or OpenSearch powers the product search experience, including search results, relevance, filtering, and layered navigation.
Before installing or upgrading to Magento 2.4, confirm that your hosting environment supports the correct search engine version and that Magento can connect to it.
Magento 2.4 search depends on the right hosting stack, service configuration, resources, security, and support. Explore Liquid Web Magento hosting for infrastructure designed to support Magento requirements, including the services needed to run search with confidence.
Ready to get started?
Get the fastest, most secure Magento hosting on the market
Additional resources
A guide to getting your Magento 2 certification →
Advance your expertise by mastering the skills needed to become a certified Magento professional.
Best Magento 2 search extensions →
Boost your store’s functionality and performance with our curated list of essential extensions for Magento 2.
Magento top tools and best practices →
Enhance the shopping experience by optimizing how customers find and interact with products on your store.
