Configure Magento to use Elasticsearch | Magento 2 Developer


Home (/guides/v2.1/) Configuration Guide (/guides/v2.1/config-guide/bk-config-guide.html) Configure Magento to use Elasticsearch

Configure Magento to use Elasticsearch This section discusses the minimum settings you must choose to test Elasticsearch with Magento 2. For additional details about configuring Elasticsearch, see the Magento Commerce User Guide ( To configure Magento to use Elasticsearch: 1. Log in to the Magento Admin as an administrator. 2. Click Stores > Settings > Configuration > Catalog > Catalog > Catalog Search. 3. From the Search Engine list, click Elasticsearch or Elasticsearch 5.0+ as the following figure shows. (The Elasticsearch 5.0+ option is not available for Magento 2.1.)

4. The following table discusses only the configuration options required to test the connection with Magento. Unless you changed Elasticsearch server settings, the defaults should work. Skip to the next step.



Elasticsearch Server Hostname

Enter the fully qualified host name or IP address of the machine running Elasticsearch. Magento Commerce (Cloud): Get this value (/guides/v2.1/cloud/project/project-conf-files_serviceselastic.html#cloud-es-config-mg) from your integration system.

Elasticsearch Server Port

Enter the Elasticsearch web server proxy port. In our example, the port is 8080 but if you're using a secure proxy, it's typically 443 . Magento Commerce (Cloud): Get this value (/guides/v2.1/cloud/project/project-conf-files_serviceselastic.html#cloud-es-config-mg) from your integration system.

Elasticsearch Index Prefix

Enter the Elasticsearch index prefix. If you use a single Elasticsearch instance for more than one Magento installation (Staging and Production environments), you must specify a unique prefix for each installation. Otherwise, you can use the default prefix magento2 .

Enable Elasticsearch HTTP Auth

Click Yes only if you enabled authentication for your Elasticsearch server. If so, provide a user name and password in the provided fields.

5. Click Test Connection. One of the following displays:


Meaning Magento successfully connected to the Elasticsearch server. Continue with Configure Apache and Elasticsearch (/guides/v2.1/configguide/elasticsearch/es-config-apache.html) or Configure nginx and Elasticsearch (/guides/v2.1/config-guide/elasticsearch/es-confignginx.html). Try the following: Make sure the Elasticsearch server is running. If the Elasticsearch server is on a different host from Magento, log in to the Magento server and ping the Elasticsearch host. Resolve network connectivity issues and test the connection again. Examine the command window in which you started Elasticsearch for stack traces and exceptions. You must resolve those before you continue. In particular, make sure you started Elasticsearch as a user with root privileges. Make sure that UNIX firewall and SELinux (/guides/v2.1/configguide/elasticsearch/es-overview.html#firewall-selinux) are both disabled, or set up rules to enable Elasticsearch and Magento to communicate with each other. Verify the value of the Elasticsearch Server Hostname field. Make sure the server is available. You can try the server's IP address instead. Use the command netstat -an | grep listen-port command to verify that the port specified in the Elasticsearch Server Port field is not being used by another process. For example, to see if Elasticsearch is running on its default port, use the following command: netstat -an | grep 9200 If Elasticsearch is running on port 9200, it displays similar to the following: tcp 0 0 :::9200 :::* LISTEN

Reindexing catalog search and refreshing the full page cache After you change Magento’s Elasticsearch configuration, you must reindex the catalog search index and refresh the full page using the Admin or command line. To refresh the cache using the Admin: 1. In the Admin, click System > Cache Management. 2. Select the check box next to Page Cache. 3. From the Actions list in the upper right, click Refresh. The following figure shows an example.

To clean the cache using the command line, use the magento cache:clean (/guides/v2.1/config-guide/cli/config-cli-subcommandscache.html#config-cli-subcommands-cache-clean) command. To reindex using the command line: 1. Log in to your Magento server as, or switch to, the Magento file system owner (/guides/v2.1/install-gde/prereq/apache-user.html). 2. Enter any of the following commands: Enter the following command to reindex the catalog search index only: php /bin magento indexer:reindex catalogsearch_fulltext

Enter the following command to reindex all indexers: php /bin magento indexer:reindex 3. Wait while the reindexing completes.

Unlike the cache, indexers are updated by a cron job. Make sure cron is enabled (/guides/v2.1/config-guide/cli/config-clisubcommands-cron.html) before you start using Elasticsearch.

© 2018 Magento. All rights reserved.

Give us feedback ( title=&body=Feedback on page: /guides/v2.1/configguide/elasticsearch/configuremagento.html)


Configure Magento to use Elasticsearch | Magento 2 Developer

Home (/guides/v2.1/) Configuration Guide (/guides/v2.1/config-guide/bk-config-guide.html) Configure Magento to use Elasticsearch Configure Magento to...

318KB Sizes 3 Downloads 11 Views

Recommend Documents

Install and configure Elasticsearch | Magento 2 Developer
Install prerequisites and Elasticsearch. The tasks discussed in this section require the following: Firewall and SELinux

How to Configure Magento Elasticsearch - Cloudways
Oct 19, 2017 - Magento Elasticsearch is a server-based tool that is capable of full-text searching at a very high speed.

smile-magento-elasticsearch: Magento
Magento ElasticSearch Implementation. Contribute to smile-magento-elasticsearch development by creating an account on Gi

Install and Configure Elasticsearch on Magento - Hashnode
Install and Configure Elasticsearch on Magento. Upvote1. Follow1. Write your comment… Post comment.

Elasticsearch Magento 2 Extension - Advance Magento Search
Magento 2 Elastic Search Extension by MageDelight offers precise & faster search result with autocomplete feature, produ

Magento 2 Elasticsearch Ultimate - Mirasvit Magento Extensions
Elastic Search Ultimate will lead your customers exactly to the products they are looking for! This will ultimately crea

Install and Configure Elasticsearch on Magento - Magenticians
Dec 12, 2016 - Have you not found the Magento search solution yet? Take advantage! Install and Configure Elasticsearch o

Magento Elasticsearch
Enhance Magento catalog search with Elasticsearch®, the distributed real-time search engine for the cloud. This extensi

Magento Elasticsearch - MAGETREND Magento Extensions
MT Search extension is based on Elasticsearch. More relevant search results. Included auto suggestion feature!

Steps to install and configure elasticsearch with magento - TechThings
Aug 11, 2016 - ElasticSearch : Elasticsearch is a distributed, open source search and analytics engine, designed for hor