How to configure Elasticsearch in Magento 2?

In this article, we will look through the Elasticsearch configurations in Magento 2. But before we start, make sure you have installed the Elasticsearch engine to your server. For this, check the official installation guide or ask our specialists about the installation service.

→ Extend search possibilities with our Elastic Search plugin. It includes autocomplete suggestions, spell correction, long-tail search, fallback search, and other features to make the on-store search even faster.

Magento 2 Elasticsearch configuration

Magento 2 Elasticsearch configuration process consists of the following steps:

catalog search settings

catalog search connection settings

Elasticsearch index prefix Magento 2 option means that you need to enter an Elasticsearch index prefix. If you use one Elasticsearch instance for more than one Magento installation, specify a unique prefix for each installation. If not, use the default magento2 prefix.

Step 1. In the Elasticsearch Server Timeout field, enter the number in seconds. Then, click Test Connection. If you get the error and test failed, check the official documentation to solve this problem.

Step 2. Finally, configure the search suggestions.

search suggestions settings

In the Search Suggestions Count, specify how many search suggestions you want to display.

Step 3. In the Show Results for Each Suggestion field, you can set up if you want to display the total number of search results.

Step 4. Enable Search Recommendations, then enter the Search Recommendation Count, and set if you want to Show Results Count for Each Recommendation.

Step 5. Save the changes.

After this, you can configure Elasticsearch search terms for your Magento 2 store, for example, misspelled words and synonyms. To learn how to do this, check out the official guide.

→ Help users to navigate through your e-store with the Improved Layered Navigation plugin

How can we help you?

Didn’t you find the answer to your question? We are always happy to help you out.

© 2009-2021 Amasty. All Rights Reserved.