Shopify filters and AI search – Add Synonyms and custom field
April 23, 2020
Author: Impresee

Are you looking a good Shopify filters for your store ?

Impresee Creative Search Bar & Filters is a complete search and filter solution that comprises text search, visual search, and creative search functionalities.

In this document, you will learn how to configure the instant text search and filters for a Shopify store. Other platforms can be configured in the Impresee’s Console following almost the same steps.

The configuration of Impresee Search is managed through CSV files. A CSV file (“comma-separated values” file) is a simple spreadsheet that can be opened with software like Google Spreadsheets, Microsoft Excel, LibreOffice Calc, or even a common text editor.  Most of the configuration steps consist of downloading a CSV template file, updating it, and then uploading it back.

Shopify App

The Instant Search can be configured through the Creative Search Bar App, that must be installed in the Shopify store. Once installed, you can access Creative Search Bar in the Apps menu from your Shopify account.

In the Impresee Configuration menu, you must enable the Instant Search by using the slider to activate the instant search service.

Catalog Synchronization

Impresee periodically synchronizes the products in your Shopify store with search servers. The catalog contains several data fields for each product. Those fields are used to search, filter and sort products.
You can see all the fields available and product values stored by Impresee by clicking on the “Download Catalog as CVS” button. If you open the catalog CSV you will see some like this

The most relevant fields are:

  • Id, it identifies each row. The row represents a product or a variation..
  • url, The webpage that shows product details (users will be redirected to this page when clicking on a product card).
  • Name, The title shown on the product card.
  • Main_image, The address of the product image that is shown in the product card.
  • Main_category, It refers to the field that contains the category of the product.
  • Price, The current real price
  • Price_From, The standard price. It is used to compute the discount percentage.
  • Parent_Code, The id of the generic product. The search will not show products with the same parent_code.

Boost fields

By default, Impresee Instant Search will be configured to search products by Id, Name and Main_Category fields. You can change that configuration in the “Boost Fields” section, by downloading the configuration with the “Export CSV” button, modifying the file and then uploading it back.

The Id field uses an EXACT search, which means that the user must write the full ID to find the product. The Name and Main_Category fields will be searched by PREFIX, which means that as the user writes the search will match all words starting with those characters.

You can search by any field in your catalog. For example, if you want to consider the brand of the products, then you just need to add a row to the file and upload it back to the server by clicking the button “Import CSV”.
The search engine computes a relevance score for each product: a higher number means a better match between the product and the user query. The scores for each search field are summed up to compute the product score.
A key step to achieve a good result is to configure the importance of each field in the final results. This is done by adjusting the SEARCH_WEIGTH for each field. For example, a match in the brand is much more important than a match in the category, thus a higher weight is given to the brand than the category.

Synonyms

Some users may call some products differently. For example, you may sell “pants” but users may search “trousers” or “slacks”. You may sell “sneakers” but users may search “tennis” or “trainers”. If you add those words as synonyms you increase the search effectiveness, so if the user writes trousers the search will be able to show the pants you are selling.

Impresee already considers some common generic synonyms for some languages, but you can boost the effectiveness of your search by also adding the terms you know users may also use.

In order to configure new synonyms you have to download the definitions file in CSV format. In the first column you add a word in your catalog and in the second column one or more words that users may also write.

FILTERS

A filter helps users to refine the search. By default Impresee includes two filters: a filter for the price and a filter by the main category, like the following:

Impresee currently has two types of filters:

-RANGE: It shows a slider where the user selects a range of values. Ideal for product fields with numeric values like Price.
-OPTIONS: The user filters the products by some attributes. Ideal for product fields like Brand, Category, Size, etc.
The following is the configuration CSV file.

For example, if you want to add a filter by size you can add a row. The DATA_TYPE column refers to the type of values in the field, which is used to sort values.

Sort by

The Sort by options enable users to reorder the search results according to one or more fields. The following is the default configuration file:

The CATALOG_FIELD refers to the product field used for the sort. The special name Imprese_Score refers to the matching score achieved by each product. The DATA_TYPE column refers to the type of values for that field (NUMBER or TEXT).
The following is the result for that configuration.

The CATALOG_FIELD_FORMAT refers to the type of sorting, by NUMERIC or TEXT

Final Thoughts

The search bar is a relevant tool for increasing conversion. Users looking for something are more willing to buy something. Configuring your search correctly will give your visitors a better experience to find what they are looking for in a faster and nicer way.

The search bar statistics gives you information about your visitors. Impresee Creative Search Bar gives you valuable analytics on how your visitors are using your search bar. We’ll give more details on this matter in our next post