Verify that a supported search engine is installed
Adobe Commerce requires Elasticsearch or OpenSearch to be installed in order to use the software.
If you are upgrading from 2.3.x to 2.4, you must check whether you are using MySQL, Elasticsearch, or a third-party extension as your catalog search engine in your 2.3.x instance. The result determines what you must do before upgrading to 2.4.
If you are upgrading patch releases within the 2.3.x or 2.4.x release lines, if Elasticsearch 7.x is already installed, you can optionally migrate to OpenSearch.
You can use the command line or the Admin to determine your catalog search engine:
-
Enter the
bin/magento config:show catalog/search/engine
command. The command returns a value ofmysql
,elasticsearch
(which indicates Elasticsearch 2 is configured),elasticsearch5
,elasticsearch6
,elasticsearch7
, or a custom value, indicating you have installed a third-party search engine. For versions earlier than 2.4.6, use theelasticsearch7
value for the Elasticsearch 7 or OpenSearch engine. For version 2.4.6 and later, use theopensearch
value for the OpenSearch engine. -
From the Admin, check the value of the Stores > Settings > Configuration > Catalog > Catalog > Catalog Search > Search Engine field.
The following sections describe what actions that you must take before upgrading to 2.4.0.
MySQL
As of 2.4, MySQL is no longer a supported catalog search engine. You must install and configure Elasticsearch or OpenSearch before upgrading. Use the following resources to help guide you through this process:
- Install and configure Elasticsearch
- Installing Elasticsearch
- Configure nginx or Apache to work with your search engine
- Configure Commerce to use Elasticsearch and reindex
Some third-party catalog search engines run on top of the Adobe Commerce search engine. Contact your vendor to determine whether you must update your extension.
MariaDB
Reindexing on MariaDB 10.4 and 10.6 takes more time compared to previous MariaDB or MySQL versions. To speed up reindexing, we recommend setting these MariaDB configuration parameters:
If you experience performance degradation not related to indexation after upgrading to MariaDB 10.6, consider enabling the --query-cache-type
setting. For example, --query-cache-type=ON
.
Before upgrading Adobe Commerce on cloud infrastructure projects, you may also need to upgrade MariaDB (see MariaDB upgrade best practices).
For example:
- Adobe Commerce 2.4.6 with MariaDB version 10.5.1 or higher
- Adobe Commerce 2.3.5 with MariaDB version 10.3 or earlier
In addition to these recommendations, you should consult with your database administrator on configuring the following parameters:
Search engine
You must install and configure either Elasticsearch 7.6 or higher or OpenSearch 1.2 before upgrading to 2.4.0. Adobe no longer supports Elasticsearch 2.x, 5.x, and 6.x. Search engine configuration in the Configuration Guide describes the tasks you must perform after upgrading Elasticsearch to a supported version.
Refer to Upgrading Elasticsearch for full instructions on backing up your data, detecting potential migration issues, and testing upgrades before deploying to production. Depending on your current version of Elasticsearch, a full cluster restart may or may not be required.
Elasticsearch requires Java Development Kit (JDK) 1.8 or higher. See Install the Java Software Development Kit (JDK) to check which version of JDK is installed.
OpenSearch
OpenSearch is an open-source fork of Elasticsearch 7.10.2, following Elasticsearch’s licensing change. The following releases of Adobe Commerce introduces support for OpenSearch:
- 2.4.6 (OpenSearch has a separate module and settings)
- 2.4.5
- 2.4.4
- 2.4.3-p2
- 2.3.7-p3
You can migrate from Elasticsearch to OpenSearch only if you are upgrading to a version of Adobe Commerce listed above (or higher).
OpenSearch requires JDK 1.8 or higher. See Install the Java Software Development Kit (JDK) to check which version of JDK is installed.
Search engine configuration describes the tasks you must perform after changing search engines.