Set up Elasticsearch service
Elasticsearch is an open source product that enables you to take data from any source, any format, and search and visualize it in real time.
- Elasticsearch performs 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
You can use the following instructions for service setup on Magento Commerce Cloud Pro Integration environments and Starter environments, including
master branch. You must submit a support ticket to configure the service on Pro Production and Staging environments. See Services.
Staging and Production environments that are in the same cluster share a single Elasticsearch instance, so you must specify a unique Elasticsearch prefix for each of these environments.
To enable Elasticsearch:
elasticsearchservice to the
.magento/services.yamlfile with the Elasticsearch version and allocated disk space in MB.
1 2 3
elasticsearch: type: elasticsearch:<version> disk: 1024
relationshipsproperty in the
relationships: elasticsearch: "elasticsearch:elasticsearch"
Add, commit, and push code changes.
git add -A && git commit -m "Enable Elasticsearch" && git push origin <branch-name>
For information on how these changes affect your environments, see Services.
Verify the service relationships and configure Elasticsearch in the Admin UI.
Reindex the Catalog Search index.
bin/magento indexer:reindex catalogsearch_fulltext
Clean the cache.
Restart the Elasticsearch service
If you need to restart the Elasticsearch service, you must contact Magento support.
Optionally, you can add Elasticsearch plugins by adding the
configuration:plugins section to the
.magento/services.yaml file. For example, the following code enables the ICU analysis plugin and Python script support plugins.
1 2 3 4 5 6 7 elasticsearch: type: elasticsearch:<service-version> disk: 1024 configuration: plugins: - analysis-icu - lang-python
If you use the ElasticSuite third-party plugin, you must update the
ece-tools package to version 2002.0.19 or later.