Set up OpenSearch service

The OpenSearch service is an open-source fork of Elasticsearch 7.10.2, following the licensing changes for Elasticsearch. See System requirements for a list of supported versions.

WARNING

Elasticsearch 7.11 and later is not supported for Adobe Commerce on cloud infrastructure. Adobe Commerce and Magento Open Source versions 2.4.4, 2.4.3-p2, and 2.3.7-p3 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
  • Elasticsearch 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.

NOTE

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

TIP

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 projects, add the opensearch service to the .magento/services.yaml file with the appropriate version and allocated disk space in MB.

    opensearch:
        type: opensearch:<version>
        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 the relationships property in the .magento.app.yaml file.

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

    git add -A && git commit -m "Enable OpenSearch" && git push origin <branch-name>
    

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

  4. Verify the service relationships and configure OpenSearch in the Admin UI.

  5. Reindex the Catalog Search index.

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

    bin/magento cache:clean
    
TIP

After initial service setup, you can change the software version for an installed service by updating the services.yaml and .magento.app.yaml configuration files. See Change service version.

On this page