How to Configure Elastic Search in Magento 2?

Planning to improvise the search experience on your store? Having a huge catalog of products on your eCommerce store? Well, we have a fantastic Magento 2 Extension to help you with this. Magento 2 ElasticSearch Extension will not only improvise the search, but it comes along with autocomplete feature as well. Magento 2.4 upgrades make it compulsory for a store to offer a user-friendly shopping experience and stay ahead of the competition.

Refer to the installation of our ElasticSearch Magento 2 Extension here!. In today’s tutorial, we will guide you with a step by step tutorial to configure MageDelight’s Magento 2 ElasticSearch.

MageDelight Elastic Search Magento 2 Extensions

Select the type of settings you are planning to implement on the store with our Magento 2 ElasticSearch Extension.

Enable ElasticSearch in Magento 2

ElasticSearch Enabled – Enable/Disable the extension.

Host – Here, the configuration of servers is mentioned in the [host]:[port] format. You can indicate the ElasticSearch nodes in this.

URL Key for Search Result Page – Mention the defined search result URL key.

Prefix for elasticsearch index – Admin is facilitated to set prefix to create elasticsearch index. This is helpful when you use the same elasticsearch on multiple websites. Note – Reindex all indexes after changing the prefix.

Test Connection – With the help of this button, admin can test if elasticsearch server have been configured properly or not.

Search Preference - Search preference supports wildcard support, the options for the same are:

“*Wildcard Search*” – supports any character before search string and after search string

“*Wildcard search at start” – supports any character before search string

“Wildcard search at end*” – supports any character after search string

“Precise Search” – supports exact match for the search string

Search Operator – Search operator supports “AND” or “OR” operator to match for search result

AND - If you are looking for ‘digital watch’ with “AND” operator then it will show you a matching result which has both words ‘digital’ and ‘watch’

OR - if you are looking for ‘digital watch’ with “OR” operator then it will show you a matching result either have words ‘digital’ or it has word ‘watch’

Magento 2 Autocomplete Search Extension

Auto-Complete Settings

No Result Template – This is the message that will appear if there is no result for the search

Auto-complete View – This is the configuration for set auto suggest view. Either it is normal or Mega view

Auto Suggest Products Magento

Display products in Auto Suggest – Choose whether to show the product in Auto Suggest or not

Product Search Result Limit – Display the limited number of products in Auto suggest

Auto Re-index Product – Re-index Admin can re-index product data for elasticsearch server.

Elastic Search Server Magento 2

Searchable Attributes – Define the product attributes that are searchable. For example, the Name and SKU.

Allow fallback Search – Make the approximate search possible. When customers don’t know the full product name, fallback search helps them search the product with a single word or a part of the product name only

Re-index Product – Re-index product data for elasticsearch server.

Elastic Search Category Settings

Display categories in Auto Suggest – Select whether to enable or disable categories displayed in the auto suggest.

Category Search Result Limit – Mention the limited number of categories to display in auto suggest.

Re-index Product – Re-index product data for elasticsearch server.

Elastic Search CMS Page Settings

Display CMS pages in Auto Suggest – If enabled, CMS pages will also be displayed in the auto-suggest.

CMS page Search Result Limit – Mention the limited number of CMS pages to be displayed in auto-suggest.

Re-index CMS Page – Re-index product data for elasticsearch server.

We hope we have mentioned the configuration process of elasticsearch well. Now grab the extension and improve search on your store. Also, if you face any issue while configuration, feel free to reach us out.

Recommended Read: 

Process of Magento 2.4 Installation with Elasticsearch

What is ElasticSearch? Benefits of Magento 2 ElasticSearch