Frequently Asked Questions on Synonyms:

  1. Is there any difference in how synonyms are treated in Magento versus how they are treated in Klevu?
  2. 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 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 the cases, synonyms provided in the Klevu Merchant center will be utilised 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 on this modified query, they will be utilised.

    These synonyms, where applicable, are automatically added to the query at runtime and searched along with the original terms searched by the shoppers.

  3. I have setup a bi-directional synonym entry. Why is it that the search results appear different when I search for them individually?
  4. 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 is:

    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“. Simiarly, if you search for the term “mummy“, the query will be as following:

    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.

  5. How do multiterm synonyms work?
  6. 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 dark bottle, we fire a query such as the following:

    (dark AND bottle) OR (“black bottle”)

    Similarly, if a customer fires 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 following:

    dark bottle <=> black && bottle

    Here, the presence of && will ensure the query is fired as the following:

    (black AND bottle) OR (dark AND bottle) .