Shopping cart

How To Configure Elasticseach in Magento 2

elasticseach

Elasticsearch is a robust and highly scalable catalog search solution which is used by high-volume sites such as eBay, Wikipedia, and GitHub. With the support of Elasticsearch, store admins can implement both search suggestions and recommendations. In this article, you will be instructed to configure Elasticsearch in Magento 2. Let’s explore three steps below!

Step 1: Configure Search Options

  1. From the Admin sidebar, select Stores. Then under Settings, select Configuration.

Configure Search Options

  1. In the panel on the left of the screen, under CATALOG, select Catalog.

Configure Search Options 2

  1. Click to Catalog Search to expand this section.

Configure Search Options 3

  1. In the Search Engine field, clear the Use system value checkbox and select the version of Elasticsearch that is installed on your server.

Configure Search Options 4

  • Elaticsearch (Deprecated) Elasticsearch 2.0+ has reached the end of life and is considered as inactive development or maintenance.
  • Elaticsearch 5.0+ (Default) Elasticsearch 5.0+ is planned for end of life.
  • Elasticsearch 6.0+ (Recommended) For the best performance, we highly recommend that you use the latest version of Elasticsearch 6.0+.
  1. In the Enable EAV Indexer field, select Yes/ No option to enable/ disable the Product EAV indexer. This functionality increases indexation speed and keeps the indexer from the use by 3rd party extensions. This feature does not display for the system value Search Engines.

  2. To restrict the length and word count of search query text, set the Minimal Query Length and Maximum Query Length.

Note: The value set for this minimum and maximum range must be compatible with the corresponding range set in your Elasticsearch search engine configurations. For example, if you set these values to 2 and 300 in Magento, update the values in your search engine.

  1. To restrict the number of popular search results to cache for faster responses, enter a number on Number of top search results to cache field.

  2. To restrict the maximum number of search results to show for search autocomplete, set an amount for Autocomplete Limit. Limiting this amount enhances the performance of searches and cut down the displayed list size. The default number is 8.

Step 2: Configure the Elasticsearch Connection

Configure the Elasticsearch Connection

  1. Enter the Elasticsearch Server Hostname. The default is localhost
  2. Enter the Elasticsearch Server Port.
  3. Enter a prefix in the Elasticsearch Index Prefix field to determine the Elasticsearch index. For instance: Magento2.
  4. In the Enable Elasticsearch HTTP Auth field, select Yes option to use HTTP authentication to suggest a username and password access Elasticsearch Server.
  5. Enter the number of seconds before the system times out to the Elasticsearch Server Timeout field. The default number is 15.
  6. To verify the configuration, click to the Test Connection button.

Step 3: Configure Suggestions and Recommendations

Search suggestions and recommendations can affect server performance

  1. In the Enable Search Suggestions field, choose the Yes option. Then, take the following actions:

Configure Suggestions and Recommendations 1

  • Fill the Search Suggestions Count field with the number of search suggestions to offer.
  • In the Show Results for Each Suggestion field, select Yes option to display the number of results found for each suggestion.
  1. In Enable Search Recommendations field, select Yes option to offer recommendations.
    • Fill the Search Recommendation Count field with the number of recommendations to offer.
    • In the Show Results Count for Each Recommendation field, select Yes to display the number of results found for each recommendation.
  2. When you finish your configuration, click to the Save Config button.

Conclusion

Above is the detail instruction to configure Elasticsearch in Magento 2. If you have questions on any steps, don’t hesitate to contact us. Would you like to provide all advanced techniques for searching online in your store? Let’s Ajax Search extension to help you! Mageplaza Ajax Search for Magento 2 is the perfect solution to make your website more optimized and flexible in searching for products as well as enhance customer satisfaction and boost your online store sale.

Explore Mageplaza Ajax Search extension now!

It comes to the end of the tutorial: How To Configure Elasticseach in Magento 2.

Posted by Jacker in Manage Store. May 09, 2019

Please leave comments if you have any questions, feedbacks.

Comments for How To Configure Elasticseach in Magento 2