Synonyms are words with the same or similar meanings. For example, "gorgeous" and "beautiful" or "curtains" and "drapes." Klevu’s synonym management feature allows you to enhance search results by connecting similar terms, ensuring shoppers find relevant products regardless of the specific term they use. This guide explains how to manage synonyms effectively in the Klevu Merchant Center.
Understanding Synonym Types
Each synonym entry can be of two types:
- Bi-Directional Synonyms
All terms are interchangeable and treated as synonyms of one another.
Example:- Search Term: Sweater
- Synonyms: Sweatshirt, Jumper, Woolly, Woolen
- Behavior: Searching for any term (e.g., "Sweater") will also search for all synonyms ("Sweatshirt," "Jumper," etc.).
- Uni-Directional Synonyms
The relationship flows in one direction only.
Example:- Search Term: Tablet
- Synonym: iPad
- Behavior: Searching for "Tablet" will include results for "iPad," but searching for "iPad" will not include results for "Tablet."
Managing Synonyms
You can manage synonyms in two ways:
- Using the Klevu Merchant Center (KMC) UI
- Log in to the Klevu Merchant Center using your registered email and password.
- Select the desired store from the drop-down menu from the top header.
- From left menu, navigate to Smart Search → Synonyms.
- Click on ADD NEW.
- Enter a search term in the Search Term field.
- Select the Direction as <=> (bi-directional) or => (uni-directional)
- Add synonyms separated by commas in the Synonyms field.
Example:- Search Term: Sweater
- Direction: <=>
- Synonyms: Sweatshirt, Jumper, Woolly, Woolen
- Click Save. Please note that it may take up to 15 minutes for changes to reflect in search results.
- Using CSV File Upload
- Click on Import/Export button on the Synonyms screen.
- Upload a CSV file containing bi-directional and/or uni-directional synonyms. You can combine both types in the same file. Download a sample CSV file.
- Click Import. Please note that it may take up to 15 minutes for changes to reflect in search results.
CSV File Formatting Guidelines
- For bi-directional synonyms: Enter all synonymous terms on the same line, separated by commas.
Example CSV Entry: beautiful, gorgeous, lovely, stunning
For uni-directional synonyms: Use the => symbol to define uni-directional relationships. Place the primary search term before the => and its synonyms after, separated by commas.
Example CSV Entry: apple=>ipod, iphone, ipad
Important Notes for CSV File Upload
- File Requirements:
- File type: CSV with a comma delimiter
- Maximum size: 2 MB
- Overwriting:
Uploading a new CSV file will overwrite the current synonyms. To add new entries without losing existing ones:
- Download the latest uploaded CSV file.
- Add new entries.
- Re-upload the updated file.
- Uni-Directional Synonym Rules:
- Only one keyword is allowed before the
=>
symbol.
Valid Entry:apple=>iphone,ipad
Invalid Entry: apple,ipod=>iphone,ipad
- Only one keyword is allowed before the
Frequently Asked Questions
Synonyms in Magento are treated differently than how they are used in Klevu. In Magento, when someone says "beautiful" is a synonym for the word "gorgeous", it literally means, if someone types in "gorgeous", use the term "beautiful" to search; do not use the term "gorgeous" at all. It is also important to note that synonyms in Magento only work when the entire query matches the words used for synonyms. Here, if someone says "gorgeous purse", Magento will NOT replace the term "gorgeous" with the term "beautiful".
Klevu, on the other hand, treats synonyms differently. If a customer types in "gorgeous", Klevu will search for both the terms (i.e. "gorgeous" and "beautiful"). At the same time, it doesn't have to be the exact query for the synonyms to work. In other words, if a customer searches for "gorgeous purse", it will fire the following query
(gorgeous OR beautiful) AND purse
In the case of the quick search UI, the query is directly submitted to the Klevu servers. The same is true for the landing page based on the Klevu template. In both cases, synonyms provided in the Klevu Merchant center will be utilized to find the products.
If you are using the native layout option for the landing page, Magento will first look at the query and if there is any applicable synonym, it will replace the original query with the synonym specified in the Magento admin panel. This query is then submitted to the Klevu servers. If there are any synonyms applicable to this modified query, they will be utilized.
These synonyms, where applicable, are automatically added to the query at runtime and searched along with the original terms searched by the shoppers.
For example, you have added a synonym entry such as the following:
mummy <=> mother
and you are expecting that the results should be similar for whichever word you search for. However, the results may be different. Why?
Klevu is a search as you type solution. In other words, when you type a search term (e.g. mother), internally it searches for the term "mother" as well as any term that starts with the term "mother" (e.g. motherland, motherhood, mothers, etc.). Thus the query Klevu fires internally are:
mother OR mother*
Now, when you have to add a synonym, the above query will change to the following:
mother OR mother* OR mummy
Please, note the addition of the synonym "mummy" in the query. However, we will not search for any term that starts with the word "mummy". Similarly, if you search for the term "mummy", the query will be as follows:
mummy OR mummy* OR mother
As you can see, it is very much likely that not only the result order but also the ranking of results be different.
For example, you have added a synonym entry such as the following:
dark bottle <=> black bottle
and you are expecting that the results should be similar for whichever phrase you search for (i.e. dark bottle vs black bottle). However, the results may be different. Why?
In the case above, when a customer searches for the dark bottle, we fire a query such as the following:
(dark AND bottle) OR ("black bottle")
Similarly, if a customer fires a black bottle as a query, we fire a query such as the following:
(black AND bottle) OR ("dark bottle") .
Here, in the first synonym entry, as you can notice, by using the operator AND between the words dark and bottle, we are searching for products where both the words, dark and bottle are found. It isn't required that they appear one after the other. If the word dark, for example, is found in your color attribute and the word bottle is found in the same product's name, it is absolutely okay. Additionally, we search for the "phrase" black bottle. Since, there are quotes added around these words, the entire phrase, including their positions (i.e. the word bottle appearing after the word dark), are respected.
If you do not want them to be searched as a phrase, we advise you to add an entry as follows:
dark bottle <=> black && bottle
Here, the presence of && will ensure the query is fired as the following:
(black AND bottle) OR (dark AND bottle).