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
Magento Commerce supports Elasticsearch version 5.2 and 6.x (supported by Magento version 2.3.1 and later).
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.
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:6.5 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 relationships and configure Elasticsearch in the Admin UI.
Reindex the Catalog Search index.
bin/magento indexer:reindex catalogsearch_fulltext
Clean the cache.
Optionally, you can add plugins with the
.magento/services.yaml file. For example, to enable the ICU analysis plugin and Python script support plugin, add the
configuration:plugins section with the listed plugin codes:
1 2 3 4 5 6 7 elasticsearch: type: elasticsearch:6.5 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.
If you need to restart the Elasticsearch service, you must contact Magento support.
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.