Elasticsearch is shown as the search engine despite OpenSearch installation
- Topics:
- Install
This article provides a solution for the issue where Elasticsearch is still shown as the search engine for Adobe Commerce on cloud even after installing or upgrading to OpenSearch.
Affected versions
Adobe Commerce on cloud 2.4.4 - 2.4.5-p11
Issue
Elasticsearch is still shown as the search engine for Adobe Commerce on cloud even after installing or upgrading to OpenSearch.
Steps to reproduce:
- Go to Stores > Configuration > Catalog > Catalog Search.
- Check the search engine. It will show Elasticsearch7.
Cause
Elasticsearch7 is hard-coded in Adobe Commerce to be the search engine used in these versions.
This is not to be confused with the installed version of the service. Even though there isn’t an Opensearch module included in the code, Adobe Commerce is able to make use of the underlying Opensearch service.
Solution
To verify if OpenSearch has been installed, run the following command:
Method 1:
- Run the following command on server:
curl 127.0.0.1:9200
. It should return OpenSearch with its version.
Example:
$ curl 127.0.0.1:9200
{
"name" : $clusterName,
"cluster_name" : "opensearch_stg",
"cluster_uuid" : $clusterUuid,
"version" : {
"distribution" : "opensearch",
"number" : "1.2.4",
"build_type" : "deb",
"build_hash" : "44ccdbaed5fe5a8b02d99a611857a671b6dd909d",
"build_date" : "2022-11-08T09:23:45.993372Z",
"build_snapshot" : false,
"lucene_version" : "8.10.1",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "The OpenSearch Project: https://opensearch.org/"
}
Method 2:
- Use the following command on the Magento-cloud CLI:
magento-cloud relationships -p <project_id>
. After using the command, locate OpenSearch.
Related reading
Set up OpenSearch service in the Commerce on Cloud Infrastructure guide.