Elasticsearch is shown as the search engine despite OpenSearch installation

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.3-p2 - 2.4.5-p6

NOTE
OpenSearch is available as a search engine starting from Adobe Commerce 2.4.6.

Issue

Elasticsearch is still shown as the search engine for Adobe Commerce on cloud even after installing or upgrading to OpenSearch.

Steps to reproduce:

  1. Go to Stores > Configuration > Catalog > Catalog Search.
  2. Check the search engine. It will show Elasticsearch7.

Cause

Adobe Commerce is hard-coded to specify Elasticsearch7 as the search engine.

This is not to be confused with the installed version of the service. The application only recognizes Elasticsearch7 as the search engine but not OpenSearch, even though it uses the underlying OpenSearch service as the engine in the backend.

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.

Set up OpenSearch service in the Commerce on Cloud Infrastructure guide.

recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a