Set up OpenSearch service

Last update: 2023-04-27
  • Created for:
  • Admin

The OpenSearch service is an open-source fork of Elasticsearch 7.10.2, following the licensing changes for Elasticsearch. See the OpenSource Project in GitHub.


Elasticsearch 7.11 and later is not supported for Adobe Commerce on cloud infrastructure. Adobe Commerce versions 2.3.7-p3, 2.4.3-p2, and 2.4.4 and later support the OpenSearch service. The on-premises installations continue to support Elasticsearch.

OpenSearch enables you to take data from any source, any format, and search and visualize it in real time.

  • Quick and advanced searches on products in the product catalog
  • OpenSearch Analyzers support multiple languages
  • Supports stop words and synonyms
  • Indexing does not impact customers until the reindex operation completes

Use the following instructions for service setup on Pro Integration environments and Starter environments, including the master branch.


Submit an Adobe Commerce Support ticket to change the service configuration on Pro Production and Staging environments.


Adobe recommends that you always set up OpenSearch for your Adobe Commerce on cloud infrastructure project even if you plan to configure a third-party search tool for your Adobe Commerce application. Setting up OpenSearch provides a fallback option if the third-party search tool fails.

To enable OpenSearch:

  1. For Starter and Pro integration environments, add the opensearch service to the .magento/services.yaml file with the appropriate version and allocated disk space in MB. In this case, version 2 is appropriate. The minor version is not required because cloud infrastructure uses the latest version of OpenSearch.

        type: opensearch:2
        disk: 1024

    For Pro projects, you must Submit an Adobe Commerce Support ticket to change the OpenSearch version in the Staging and Production environments.

  2. Set or verify the relationships property in the file.

        opensearch: "opensearch:opensearch"
  3. Add, commit, and push code changes.

    git add .magento/services.yaml
    git commit -m "Enable OpenSearch"
    git push origin <branch-name>

    For information on how these changes affect your environments, see Configure services.

  4. After the deployment process completes, use SSH to log in to the remote environment.

    magento-cloud ssh
  5. Reindex the Catalog Search index.

    bin/magento indexer:reindex catalogsearch_fulltext
  6. Clean the cache.

    bin/magento cache:clean

After initial service setup, you can change the software version for an installed service by updating the services.yaml and configuration files. See Change service version for guidance on upgrading or downgrading a service.

OpenSearch software compatibility

When you install or upgrade your Adobe Commerce on cloud infrastructure project, always check for compatibility between the OpenSearch service version and the OpenSearch PHP client for Adobe Commerce.

  • First time setup–Confirm that the OpenSearch version specified in the services.yaml file is compatible with the OpenSearch PHP client configured for Adobe Commerce.

  • Project upgrade–Verify that the OpenSearch PHP client in the new application version is compatible with the OpenSearch service version installed on the cloud infrastructure.

Service version and compatibility support is determined by versions tested and deployed on the Cloud infrastructure, and sometimes differ from versions supported by Adobe Commerce on-premises deployments. See System requirements in the Installation Guide for a list of supported versions.

To verify OpenSearch software compatibility:

  1. On your local workstation, change to your project directory.

  2. Show the OpenSearch details for the active environment.

    magento-cloud relationships --property=opensearch
  3. Alternatively, you can use SSH to log in to the remote environment.

    magento-cloud ssh
  4. Retrieve the OpenSearch service connection details.

    vendor/bin/ece-tools env:config:show services

    In the response, find the IP address and port for the OpenSearch service endpoint:

    | opensearch:                                                                                       |
    | username                                 | null                                                   |
    | scheme                                   | http                                                   |
    | service                                  | opensearch                                             |
    | fragment                                 | null                                                   |
    | ip                                       |                                         |
    | hostname                                 | |
    | port                                     | 9200                                                   |
    | cluster                                  | projectID-develop-4ranwui                              |
    | host                                     | opensearch.internal                                    |
    | rel                                      | opensearch                                             |
    | path                                     | null                                                   |
    | query                                    |                                                        |
    | password                                 | null                                                   |
    | type                                     | opensearch:2                                           |
    | public                                   | false                                                  |
    | host_mapped                              | false                                                  |
  5. Retrieve the installed OpenSearch service version:number from the service endpoint.

    curl -XGET <opensearch-service-endpoint-ip-address>:9200
       "name" : "opensearch.0",
       "cluster_name" : "opensearch",
       "cluster_uuid" : "_yzaae6-ywSEW1MaAF8ZPWyQ",
       "version" : {
         "distribution" : "opensearch",
         "number" : "2.5.0",
         "build_type" : "deb",
         "build_hash" : "aaaaaaa",
         "build_date" : "2023-01-23T12:07:18.760675Z",
         "build_snapshot" : false,
         "lucene_version" : "9.4.2",
         "minimum_wire_compatibility_version" : "7.10.0",
         "minimum_index_compatibility_version" : "7.0.0"
    "tagline" : "The OpenSearch Project:"

For Pro projects, you must submit an Adobe Commerce Support ticket to install or update services in Staging and Production environments only.

Indicate the service changes needed, include your updated and services.yaml files, and state the PHP version in the ticket. For self-service changes to PHP version, extensions, or environment settings, see PHP settings in Application configuration.

For changes to a live Production environment (Pro only), you must provide a minimum of 48 hours notice to allow the Cloud infrastructure team sufficient time to marshal resources and conduct a secure upgrade.

Restart the OpenSearch service

If you need to restart the OpenSearch service, you must contact Adobe Commerce support.

Additional search configuration

  • By default, the search configuration for Cloud environments regenerates each time you deploy. You can use the SEARCH_CONFIGURATION deploy variable to retain custom search settings between deployments. See Deploy variables.

  • After you set up the OpenSearch service for your project, use the Admin UI to test the OpenSearch connection and customize OpenSearch settings for Adobe Commerce.

Add plugins for OpenSearch

Optionally, you can add plugins for OpenSearch by adding the configuration:plugins section to the OpenSearch service in the .magento/services.yaml file. For example, the following code enables the ICU analysis and Phonetic analysis plugins.

    type: opensearch:2
    disk: 1024
            - analysis-icu
            - analysis-phonetic

See the OpenSearch Project for more information on plugins.

Remove plugins for OpenSearch

Removing the plugin entries from the opensearch: section of the .magento/services.yaml file does not uninstall or disable the service. To fully disable the service, you must reindex your OpenSearch data after removing the plugins from your .magento/services.yaml file. This design prevents the possible loss or corruption of data that depends on these plugins.

To remove OpenSearch plugins:

  1. Remove the OpenSearch plugin entries from your .magento/services.yaml file.

  2. Add, commit, and push your code changes.

    git add .magento/services.yaml
    git commit -m "Remove OpenSearch plugin"
    git push origin <branch-name>
  3. Commit the .magento/services.yaml changes to your cloud repository.

  4. Reindex the Catalog Search index.

    bin/magento indexer:reindex catalogsearch_fulltext
  5. Clean the cache.

    bin/magento cache:clean

On this page