OpenCart Elasticsearch: Now easily integrate Elasticsearch engine within your OpenCart web store using the OpenCart Elasticsearch extension. Store your entire product catalog on the server where you have installed the Elasticsearch and provide search and autocomplete suggestions for the customers of your web store.
Elasticsearch is a highly scalable open-source full-text search engine. It allows you to store, search, and analyze big volumes of data very quickly. It is the fastest search engine that returns the results of the entered query in real time.
**Note: Before installing this module, Elastic Search Engine must be installed on the system and must be running.
- Admin can replace MySQL search engine with the Elastic search engine.
- Admin can upload/update products, categories, and information pages data to the elastic server.
- Admin can allow Elasticsearch login authentication.
- Store data on the elastic server according to the index types.
- The customer can search data by name, SKU, description and short description of the Product.
- Has the Spell Correction Feature according to which the search engine automatically corrects the keywords if they are typed incorrectly.
Extract the contents of the received zip folder on your system according to your Opencart version. The extracted folder has admin, catalog, ocmod, and system folders. Now, upload the admin, catalog, and system directories into the Opencart root directory as shown below in the snapshot.
Once you have uploaded the folders, login to admin and then from the catalog section go to Extensions> Extension Installer and upload the XML file. The XML file is in the ocmod folder under module directory. In the ocmod folder, select the Opencart version that you are using and under it, you will find wk_elastic_search.ocmod.xml file.
After that in Admin panel go to System -> Users -> User Groups and edit ‘Administrator’ and choose to select all for both Access and Modify Permission for the permission that you want to provide and save it.
Module Configuration – OpenCart Elasticsearch
First, select the store for which you want to implement the Elastic search. This option if for a multi-store configuration.
Now, the admin will configure the options under General Settings tab –
- Select the Status of the Elastic search engine as Enabled/Disabled as required
- Enter the Elasticsearch Host address(IP address of the server with Elasticsearch installed)
- Enter the Elasticsearch Port number(server with Elasticsearch installed)
- Select the Elasticsearch Scheme as to use HTTP or HTTPS
- Choose to have a Login Authentication for the Elastic Server by selecting Enabled(need to enter Username & Password) or select as Disabled
After this, the admin has to configure the settings under the Search tab. Here, you have 2 more tabs –
Here, configure the General settings for the Search –
- Enter the Minimum Number Of Characters To Search
- Select to Redirect If Single Result by selecting Enabled or Disabled
- For Search In check the sections where you want to search on front-end
- Check the sections under the option Search In Product For where you want to search for the product
- For the option Search In Category For check the sections where where you want the search
- For the Option Search In Information check the sections that should be searched on the information pages.
And under the Design tab –
Here for the 2 options –
- Details To Be Shown On Search Result – check the product detail sections that you want to display at the front-end
- Search Text Box Placeholder – enter the placeholder for the front-end search box
Finally, you can click the Save button at the top right-hand side to save the configuration settings.
How to Connect to the Elasticsearch Server?
Under the General section in the configuration settings, after you have entered the correct details click Check Status button at the top right-hand corner.
This checks the connection and if connection is established you will see a message with details.
Elastic Search Index Management
Here, to add an index enter –
- The Index Name(every character must be lower case)
- The Index Type(select the index type for this mapping)
- The Number of Shards(number of shards per node should be below 20-25 per GB heap)
- The Number of Replicas(if the node holding a primary shard dies, a replica is promoted to the role of primary)
- Select the Status of this Index as Enabled or Disabled
- lastly, click the Save button to save the Data Index
Elasticsearch at Work
On the front-end, the customers can now make use of the Elasticsearch for making the fastest search within your OpenCart web store.
Search Suggestions: When customer searches for a character string suggestions are provided for the entered string. Customer can now click any of the suggestions to redirect to the selected suggestion.
Full Keyword Search: When a keyword is searched; along with the suggestions you see the products being displayed with the keyword.
Description Search: Customer can also search the products using the product description.
Current Product Version - 220.127.116.11
Supported Framework Version - 2.x.x.x