How to configure Magento 2 to use Elasticsearch

How to configure Magento 2 to use Elasticsearch

Contents

What you need

If you are a Nexcess Magento 2 Cloud client:

Step 1: Configure Magento 2 to use Elasticsearch

ATTENTION: If you have not already done so, follow the steps provided in How to enable Elasticsearch for your Nexcess Cloud account before continuing. 

  1. Log in to your Magento 2 admin panel.

  2. From your dashboard, select Stores > Configuration.


  3. From the Catalog drop-down menu, select Catalog, then Catalog Search.


  4. From the Search Engine drop-down list, select Elasticsearch 6.0+ (1). Fill the Elasticsearch Server Hostname (2) and Elasticsearch Server Port (3) fields.

    ATTENTION: 
    If you are a Magento 2 Nexcess Cloud client, use the information provided in Step 4 of How to enable Elasticsearch for your Magento 2 Cloud account for the Elasticsearch Server Hostname and Elasticsearch Server Port fields.



  5. Click Test Connection. If the test passes, go to Step 2 be;pw. If it fails, either follow the provided recommendations, or contact our 24/7 Support team by email or through your Client Portal.

 

Step 2: Refresh your full page cache

You may perform this step from either the Admin panel or the command line.

Method 2a: From the Admin Panel

  1. From the dashboard, select System > Cache Management.

  2. Select the PageCache check box (1), confirm the Refresh selection (2), then click Submit.

Method 2b: From the command line

If necessary, see How to generate and view SSH/FTP passwords for your Nexcess Cloud Account.

Log in to your Magento server, then issue:

magento cache: clean

Step 3: Reindex catalog search

  1. Log in to your Magento server.

  2. Enter one of the following commands, but replace the angled brackets (<>) and everything between them with the indicated information.

    ATTENTION
    : If you are a Nexcess Cloud client, <your_magento_install_dir> will use your domain name; for example, mydomain.com/bin/magento.

    1. To reindex the catalog search index only:

      php <your_Magento_install_dir>/bin/magento indexer:reindex catalogsearch_fulltext

    2. To reindex all indexers:

      php <your_Magento_install_dir>/bin/magento indexer:reindex

Reverting to MySQL

If you experience issues with Elasticsearch and cannot resolve them, repeat Steps 1A-1D, but select MySQL for the Search Engine field and save. Then, repeat Step 2: Refresh your full page cache and Step 3: Reindex catalog search.

For 24-hour assistance any day of the year, contact our Support Team by email or through the Client Portal.

Article Rating (1 Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
 
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
How to create MySQL databases with SiteWorx
Added on Mon, Mar 25, 2019
How to truncate MySQL tables in SiteWorx
Added on Mon, Dec 17, 2018
How to change the password for MySQL database users in Nexcess Cloud
Added on Wed, Dec 19, 2018
How to reset Magento 2 admin passwords
Added on Fri, Dec 28, 2018
What is phpMyAdmin?
Added on Mon, Dec 17, 2018
How to enable CAPTCHA for user creation in Magento 2
Added on Mon, Feb 19, 2018
How to import and export MySQL databases in SiteWorx
Added on Mon, Dec 31, 2018
How to import and export MySQL databases in Nexcess Cloud
Added on Mon, Dec 17, 2018
How to set up Magento 2 to use your SSL certificate
Added on Fri, Dec 28, 2018
What is Magento?
Added on Tue, Jan 29, 2019