Menu Close
    Start a Project Request quote Reading list Switch to dark mode
    hyperlocal-marketplace-guide

    Elasticsearch for WooCommerce

    Elasticsearch for WooCommerce: We all know the concept of a Simple Search process of an online E-Commerce store, isn’t it? Wherefore, we can consider Elasticsearch as just an extended version of a simple search.

    It incorporates various search conditions that can be added as per the site’s requirement and consequently, it has an edge over a simple search.

    In light of the above, Elasticsearch for WooCommerce is one of its kind, serving the WooCommerce sites with its enhanced search approaches.

    It incorporates the Simple-Match Query and Multi-Match Query for search scenarios. This defines the kind of search that will execute at the frontend when a customer hops in to search for a product(s).

    Spell checks, language stemmers or replace/ remove unnecessary characters from search input data, these are some of the imperative features of the Elasticsearch for WooCommerce plugin.

    As Elasticsearch help manage a large amount of data, it helps retrieve the searched data in a without any time lag.

    Thus we can expect a great user experience, which shall surely generate real sales, hence a good amount of revenue generation for the site.

    Note:

    • In the first place, one must install the Elastic Search Engine which must be in the running state.
    • One must install composer on their servers; else follow the given instruction to install composer- Composer Installation.
    • Also, it does not allow or support third party custom search; it works for only WooCommerce/ WordPress searches.
    • Elasticsearch for WooCommerce is compatible with the “6.8.6” version of Elasticsearch.

    Features

    • The admin has the leverage to update products or pages data on the elastic server.
    • As per the Index Type, the data is stored on the elastic server. 
    • The admin can set Cron for Index Management as daily, weekly or monthly basis, which updates the changes, accordingly.
    • The search type can be chosen as Multi-Match Query or Simple Match Query to process a search. 
    • In case of Multi-Match Query, the customer can process a search on the basis of name, SKU, description and short description of the Product.
    • The spell correction feature automatically corrects the keywords if they are typed incorrectly by the customer.  
    • A synonym list which the admin defines, simplifies the search process for the customers. 
    • Search filters such as Lowercase, Stop Words, Synonym List, Html Strip char Filter, Mapping Filters or Pattern Replace Filter are chosen by the admin. 
    • The character filters help replace or even remove the unnecessary characters from the customer’s search input stream.
    • The admin can choose Language Stemmer in according to the default language of the store.

    Installation

    The user will get a zip file which needs to be uploaded in the “Add New” menu option in the WordPress admin panel.

    For this login to WordPress Admin Panel and in the Dashboard hover your mouse over the “Plugins” menu option select the “Add New” option.

    After this, the user will see an “Upload Plugin” option at the top of the page, click the option to upload the zip file.

    On clicking the “Upload Plugin” option, the user will see a “Choose File” button. Click on the button to browse for the zip file as per the image below.

    After browsing the file, click on the “Install Now” button so as to install the plugin as per the snapshot.

    Once the user installs the plugin, the user can activate the plugin. The user needs to click on the “Activate Plugin” button to activate the plugin.

    After activating the plugin, the below-mentioned command must be run in the respective directory (domain/wp-content/plugins/wp-woocommerce-elasticsearch) via terminal. 

    command-

    Setting up Configurations: Elasticsearch

    Once the installation process is complete, the admin must navigate to the Elastic Search which is present in the admin panel as shown in the image below. 

    Under the Settings tab, the admin has to configure the-
    • General Settings,
    • Search Settings, and
    • Set Cron for Index Management. 
    General Settings

    Firstly, under settings tab, the admin has to configure the General settings. The admin sets the configurations for fields such as Host, Port, Index Prefix, etc. 

    The admin configures the General Settings as under: 

    Host: The host or website on which the admin wishes to configure the elastic search.  

    Port Number: The number of the port to establish a connection with the elastic server.

    Index Prefix: The admin defines a specific index prefix, While reindexing, if we are using elastic search on multiple websites it does not aftect the data on other websites. 

    Check Connection Status: Check the current status of the elastic server and establish a connection. 

    Reset connection: It removes the entire data and resets the connection of the elastic server. The admin can process the reindexing process either manually or set a cron job to automatically process it under Index Managment otpion. 

    Search Settings

    The next in the configuration list is Search Settings. 

    In the first field i.e. Select Frontend Search type, under Search Settings, the admin must choose either Multi Match Query or Simple Match Query

    Let us explore their configurations separately. 

    Search Settings: Multi Match Query

    On choosing the Select Frontend Search Type under Search settings Multi Match Query, the admin needs to configure fields such as Select Fields for Multi Search, Select Multi Match Type, Select Operator for Multi Search, etc.  

    The Multi Match Query configurations may be set as under: 

    Select:

    • Fields for Multi Search: The admin chooses the fields such as name, sku, description, etc. to execute multiple search. 
    • Multi Match Type: Against this field, the admin may choose Best fields, Most fields, Cross fields, Prefix and Prefix Phrase. To know more about Multi Match types, tap here
    • Operator for Multi Search: The admin may select either AND or OR operator to perform multi search. 

    Minimum Should Match: The admin must specify percentage or number of clauses in the returned data that should match.

    Allow Spell Corection in Search: The admin has to choose either Level 1 or Level 2 against this field. 

    • At times the customers tend to type incorrect spellings when searching for products. 
    • Hence, as per the level (1 or 2) set by the admin, it corrects the misspelt word, automatically. 

    Select Search filters: The admin add filters such as Lowercase Filters, Synonym Filter,  Stop Word Filter, etc. (This field is discussed in detail below).

    Use Stop Words Filter: The admin may set this field as ‘Yes’ or ‘No’ to enable or disable stop words filter. 

    Enter Comma Separated List of Stop Words: The admin adds a list of stop words which are separated by a comma. 

    Select Language Stemmer: The admin selects an appropriate Language Stemmer as per the requirement of the store. 

    • For instance, if chosen as English, then customers can only process a search in English language. 

    Enter Comma Separated:-

    •  Words to exclude from Stemming: The admin can add comma separated forms of words which should not be a part of stemming process. For instance, the search results for product named as playing or cars will remain the same if a customer looks for it on the site. No Filter (play or car) shall apply as per the stemming procedure.
    • List of Filter Mappings: The admin adds a character filters. If by chance, the customes adds a character or string of characters which is same as that of the admin, it replaces and adds the value linked with it. 

    Enter:- 

    • Pattern: The admin adds a expression against this field. If a customers tends to add some character in the search stream, it gets replaced with the admin string.
    • Pattern to replace with Filter Pattern: The character, which shall replace the customer added character stream, if any. 
    Search Settings: Simple Match Query

    Under Simple Match Query, the admin will have to configure the fields such as- Allow Spell Correction in Search, Select Search Filters, Use Stop Words Filter, etc.

    The Simple Match Query settings may be set as under: 

    Allow Spell Correction in Search: The admin may select Level 1 or Level 2 against this field. 

    • At times the customers tend to type incorrect spellings when searching for products. 
    • Hence, as per the level (1 or 2) set by the admin, the misspelt word is corrected automatically. 

    Select Search Filters: The admin may choose this as Lowercase Filters, Synonym Filter,  Stop Word Filter, etc. (This field is discussed in detail below).

    Use Stop Words Filter: The admin may set this field as ‘Yes’ or ‘No’ to allow or disallow stop words filter. 

    Enter Comma Separated List of Stop Words: A  list of stop words which are separated by a comma. 

    Select Language Stemmer: The admin selects an appropriate Language Stemmer as per the store’s requirement. 

    • For instance, if the Language Stemmer has been set to English, then customers can only process a search in English. 

    Enter Comma Separated:-

    •  Words to exclude from Stemming: The admin adds word forms  which must not be included in the seach string. 
    • List of Filter Mappings: The admin adds a character filters, which will replace the customer added character string with the value associated with it. 

    Enter:-

    • Pattern: The admin adds a expression, which replaces the customers added character stream, if any. 
    • Pattern to replace with Filter Pattern: The character, which shall replace the customer added character stream, if any. 

    Set Cron for Index Management

    At last, the admin has to set the configurations for- Set Cron for Index Management. 

    The admin can set the configurations for Set Cron for Index Management as follows: 

    Select Cron Status: The admin sets the status of the cron as Enable or Disable. 

    Select Cron Frequency: The  admin sets the cron frequency as Hourly, Daily, and Monthly.

    Cron Start Time: The time when the cron must start. 

    Further, to manually perform reindexing, the admin must navigate to Elastic Search > Index Management

    It redirects to the Elastic Indexes page. The admin can tap on the Reindex button in the Action column to manually carry out the reindexing process for Products or Pages, as per the requirement. 

    Select Search Filters: Multi/ Simple Match Query

    Select Search Filters is one of the most exigent configurations as it manages the major part of the customer’s search depends on it. 

    Against the Select Search Filters field we can choose some filters. These include Lowercase Filter, Synonym Filter, Stop Words Filter, HTML Strip Char Filter, Mapping and Pattern Replace. 

    Also known as Character Filters, these play a major role in eliminating the needless characters from the words which the customers type for searching for any entity.

    Let’s define the Character Words in detail:

    1. Lowercase Filter: This help convert the lowercase alphabets in the customers search stream to upper case letters. 
    2. Synonym Filter: The adds a list of synonyms as per the the store’s products. For instance, if the customers searches for music (synonym for singles product), the list of products under singles will display. 
    3. Stop Words Filter: If set as Yes, it removes the stop words form the customer’s search. 
    4. HTML strip char filter: The HTML strip  character filter removes HTML elements with the ones which the admin adds. 
    5. Mapping Filter: The mapping filter is used to replace mapping keys with values. It will remove any character from the mapping.
    6. Pattern Replace Filter: This filter works in the same way as Mapping Filter but it will replace pattern instead of mapping. It uses a regular expression to replace characters.

    To know more about the Character Filters, tap here

    Synonym List: Elasticsearch 

    To simplify the search process, the admin can even define a synonym list under Elastic Search > Synonyms List.

    For instance, in the image below, the admin creates various synonyms for the product names ‘Singles’ and ‘Phone.’ 

    If a customer wants to purchase a phone and types, suppose, mobile or cellphone, the results as per the product’s name ‘Phone’ shall display. 

    Moreover, the admin can create as many synonym list by tapping on Add Synonym tab. 

    Frontend Workflow: Elasticsearch Process

    Meanwhile, the customers can log in so as to make a purchase.

    Search Results: On typing a wrong/ incomplete name of the product

    For instance, a customer needs to buy a mobile phone. For this purpose, the customer tends to type ‘phon’ in the seach boxas shown in the image below.

    Though the spelling which the customer adds is not correct, it still displays the search results. 

    Hence, this is the essence of the Elasticseach search scenarios. 

    Search Results: On typing a synonym of a product’s name

    This feature of Elasticsearch leverage the customers to search for any products by typing their synonym names on the search box. 

    For instance, a customer who is looking for music cd or dvd, may tend to search the same by the name ‘music.’

    The results will display by the store’s product name i.e. ‘singles’ present in the store as shown in the image below. 

    That’s all for the Elasticsearch for Woocommerce. If you face any issue, feel free to add a ticket at webkul.uvdesk

    Current Product Version - 1.0.0

    Supported Framework Version - WooCommerce 3.8.x, 3.7.x, 3.6.x, 3.5.x, 3.4.x, 3.3.x, 3.2.x, 3.1.x, 3.0.x

    . . .

    Comment

    Add Your Comment

    Be the first to comment.

    Back to Top
    css.php
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just recieved your project brief and our expert will contact you shortly.
    Send Again
    Close

    Table of Content

    Hide Index