Need help?

Can't find what you are looking for? Try with one of these:


Basic PlanPro PlanEnterprise Plan

What is a Synonym?

A synonym is a word that means the same as another word in the same language, for example, “small” and “little” are synonyms. With Doofinder you can use custom synonyms to make results match other terms that are not usually included in your data feed.

What are Custom Synonyms?

Custom synonyms are sets of synonyms which are applied and stored in the Index at the time of indexing.

How to create a set of synonyms?

Go to Doomanager > Search Engines > Business Rules > Synonyms. Choose one Search Engine from the list. Navigate to the Synonyms tab. Add a synonym line (set of words that should be considered as synonyms). Save.

How to add synonyms to a line

There are two ways to add synonyms to a line. You can use simple comma-separated synonyms (fear, frightened, scared) or explicit mappings (mp3 player => ipod, i-pod, i pod). Let’s see the difference between them:

1.Simple comma-separated synonyms

Return all products that contain instances of synonyms defined in a synonym set. They are structured and added to the synonym line in the following way: Synonym1, Synonym2, Synonym3

The application of a synonym set to a product occurs at the time of indexing, where any occurrence of a defined synonym results in it being mapped to all the associated synonyms in the set.

📌 Note: Commas (,) are reserved as a term separator and cannot be used within the synonym chain.

Let’s say you have three products:

  • Thick cotton bandage
  • Special heavy machinery handling gloves
  • Low temperature air conditioner

and you have specified the following synonyms line at the Doofinder administration:

fat, thick, heavy

Whenever the user searches for fat, thick or heavy, documents containing any of these words should match as a search result:

  • If the user searches for thick, he will get the products thick cotton bandage and special heavy machinery handling gloves as results

  • If the user searches for fat or heavy, Doofinder will return results for those two products, too.

IMPORTANT: For the synonym set to be applied correctly, one of the configured words must exist in the feed. For example, if your feed indicates SHOE, the synonym set must include the word SHOE. Otherwise, it will not work.

2.Explicit Mappings:

Explicit Mappings allow greater specificity in terms of how a word or term is replaced at the time of indexing. It is done by using the following structure, including the => (symbol):

TermToReplace => Synonym1, Synonym2…

Doofinder will then replace all occurrences of i_pod for both ipod and i pod.

If your products are:

red i_pod shell ipod earphones

After indexing, they will look like:

red (ipod|i pod) shell ipod earphones

IMPORTANT: for the synonyms set to be applied correctly, the term to replace must exist in the feed.

Notice two things:

Only the first product is affected, only occurrences of the i_pod word are mapped. ipod or i pod are not replaced.

If the user searches for i_pod he will get no results.

In general terms, any occurrence of any element which is at the left of the =>; operator, is replaced by what is at the right of the =>; operator. This means that, according to our simple synonyms’ specification format:

thick, fat, heavy

is equivalent to

thick, fat, heavy => thick, fat, heavy

Replacement while indexing.

Doofinder, once per day at least (and any time you request it at its Product Feed admin section), crawls through your product feed, extracts the product info from that feed and stores it in a special file called the index. This process is called indexing.

When a user searches for anything, Doofinder looks for it in that index, because it’s built in a way that makes it really quick to find stuff.

When you specify synonyms, Doofinder, while indexing, replace any occurrence of the synonyms by the whole synonyms set, and stores it in the index.

Let’s have a look at the previous three products we were talking about. When Doofinder indexes those three products, with the synonyms line we inserted before, this is how (roughly) these products will be stored in the index (this is a human-readable representation to make it clearer).

(thick, fat, heavy) cotton bandage

Special (thick, fat, heavy) machinery handling gloves

Low temperature air conditioner

You can see now that either if you look for thick, fat or heavy, you’ll get the two first products in your search results.

In a nutshell, Doofinder replaces any occurrence of any defined synonym by all its synonyms. In other words, Doofinder maps any synonym to all its synonym.

Attention to a special case

According to how the index building works, there is a special case with hyphens (-): They are always replaced by white spaces. So, when adding synonyms, they will always be saved using spaces rather than hyphens. Let’s see another example. If you try to save this synonyms:

i-pod, ipod, music player

What will be saved instead will be:

i pod, ipod, music player

Don’t worry if, after clicking Save you see i pod instead of i-pod. The index will also have hyphens replaced this way.

All this means that if you search for i-pod, according to this synonyms, you will also get in your results list, this item:

Special Apple Ipod Touch

as it was indexed this way:

special apple (ipod|i pod|music player) touch

📌 Note: As well as hyphens are replaced by spaces, symbols are removed from tokenizers, so they can’t be used generating synonyms.