How to Configure Magento 2 Elasticsearch
Search functionality is undoubtedly one of the most crucial features of any online store.
A powerful search helps the visitors find their desired products on the Magento 2 store quickly. It contributes to the improved in-store experience and quick purchase decisions.
Whereas, if customers don’t get instant search results, they tend to bounce back and move on to your competitors.
Therefore, it’s essential to enhance the search feature, and Elasticsearch is one of the best ways to improve the search feature in Magento 2 stores.
The store admin can configure Magento 2 Elasticsearch to use its features like an open-source, readily-scalable, analytics, broadly-distributable, enterprise-grade search engine including textual, numerical, geospatial, structured, and unstructured.
Check the stepwise method to configure Easticsearch in Magento 2.
Steps to Configure Magento 2 Elasticsearch:
- Login to the admin panel
- Go to Stores > Configuration of your Magento 2 store.
- Click on the Catalog option of the Catalog tab
- Expand the Catalog Search and select the version of Elasticsearch in the Search Engine option
- Click on the Save Config button.
Configure the Elasticsearch Connection
To configure Elasticsearch, follow the below steps.
- Elasticsearch Server Hostname: Enter the server Elasticsearch server hostname. The default is localhost.
- Elasticsearch Server Port: Enter the Server port of Elasticsearch.
- Elasticsearch Index Prefix: Enter a prefix to determine the Elasticsearch index. For instance: Magento2.
- Enable Elasticsearch HTTP Auth: Select “Yes” to use HTTP authentication to suggest a username and password access Elasticsearch Server.
- Elasticsearch Server Timeout: Enter the number of seconds before the system times out here. The default number is 15.
Test Connection: To verify the configuration, click on the Test Connection button.
You can also refer to the method to install Elasticsearch on Googlecloud
One thing that is noteworthy to mention here is that Elastic search is not compatible with varchar fields. Therefore, it is essential to disable the varchar fields for the elastic search. Many of the store owners reported an Elastic Search Error: ‘Text Fields are Not Optimised for Operations’ in Magento 2.4.x, which was caused by the varchar fields ser filterable in elastic search.
If you find any difficulties in the topic, do mention them in the Comment section below.
I’ll be glad to help you.
Don’t forget to share the solution with Magento Community via social media.
Thank You.
Sanjay Jethva
Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe.
His passion for Magento 2 and Shopify solutions has made him a trusted source for businesses seeking to optimize their online stores. He loves sharing technical solutions related to Magento 2 & Shopify.
Prev
Meetanshi Magento Extensions Launches and Updates January [2021]
How to Setup Separate Theme for Desktop and Mobile in Magento 2
Next