How To Configure Elasticseach in Magento 2
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 Magento 2 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 to configure Elasticsearch in Magento 2 below:
- Step 1: Configure Search Options
- Step 2: Configure the Elasticsearch Connection
- Step 3: Configure Suggestions and Recommendations
Step 1: Configure Search Options
- From the Admin sidebar, select Stores. Then under Settings, select Configuration.
- In the panel on the left of the screen, under CATALOG, select Catalog.
- Click to Catalog Search to expand this section.
- In the Search Engine field, clear the Use system value checkbox and select the version of Elasticsearch that is installed on your server.
- 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+.
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.
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.
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.
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
- Enter the Elasticsearch Server Hostname. The default is localhost
- Enter the Elasticsearch Server Port.
- Enter a prefix in the Elasticsearch Index Prefix field to determine the Elasticsearch index. For instance: Magento2.
- In the Enable Elasticsearch HTTP Auth field, select Yes option to use HTTP authentication to suggest a username and password access Elasticsearch Server.
- Enter the number of seconds before the system times out to the Elasticsearch Server Timeout field. The default number is 15.
- To verify the configuration, click to the Test Connection button.
Step 3: Configure Suggestions and Recommendations
Search suggestions and recommendations can affect server performance
- In the Enable Search Suggestions field, choose the Yes option. Then, take the following actions:
- 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.
- 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.
- When you finish your configuration, click to the Save Config button.
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! 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.
not your workload
Simple, powerful tools to grow your business. Easy to use, quick to master and all at an affordable price.Get Started
Explore Our Products:
People also searched for
- magento 2 elasticsearch
- elasticsearch magento 2
- magento 2 disable elasticsearch
- magento 2 elasticsearch configuration
- disable elasticsearch magento 2
- elastic search magento 2
- magento 2 elastic search
- magento 2 elasticsearch extension
- elasticsearch magento 2 extension
- magento elasticsearch
- elasticsearch magento 2 module
- magento elasticsearch extension
- magento 2 configure elasticsearch
- magento 2 elasticsearch module
- magento 2 enterprise elasticsearch
- magento 2 enable elasticsearch
- elasticsearch magento
- magento elastic search
- elastic search magento
- magento 2 elasticsearch demo
- magento 2 elasticsearch 6
- magento 2.3.1 elasticsearch
- elasticsearch suggester tutorial
- magento 2 setup elasticsearch
- 2.2.x, 2.3.x, 2.4.x