Loading
Get Started with B2C Commerce
Synonyms

Synonyms

Synonyms are words or phrases that mean exactly or nearly the same as another word or phrase in B2C Commerce search. If a number of terms are defined as synonyms, then searching for one of those terms returns the results for all of the terms. You can also exclude specific synonyms using negative synonyms. Brand synonyms are automatically generated.

However, if both terms have overlapping search results, the search results for synonyms can be less than the total number of each term if they aren’t synonyms.

Synonyms are stemmed when added to the product and content index. For example, if you configure synonyms in that include lock, when a customer searches for lock, results are returned for locks, locker, and locked and their synonyms, which are also stemmed. In the following example, you can see that the same result set is returned for the synonym group, including all words containing the same word stems, such as plurals.

Configured Synonyms Customer Searches For B2C Commerce Query Results Returned For
bag, purse, pocketbook bag bag OR purse OR pocketbook bag, bags, purse, purses, pocketbook, pocketbooks
  purse bag OR purse OR pocketbook bag, bags, purse, purses, pocketbook, pocketbooks
  pocketbook bag OR purse OR pocketbook bag, bags, purse, purses, pocketbook, pocketbooks
Synonym Grouping

Terms can have overlapping results if both terms appear in the searchable fields for the product. For example, if a product has as a searchable long description, "The Ice Cap is the perfect hat for...", then it is found by a search for hat or a search for cap. Many people, when creating synonyms, expect that the search results for the synonyms must be equal to the search results for all of the individual terms. However, synonym searches don't return duplicate results, so overlapping results are only returned one time.

B2C Commerce searches for synonyms for a maximum of four words in an entered search phrase. If the user searches for big nice back packs, the query encoder tries to find a synonym for:

  • big nice back packs (4 words max)
  • big nice back or nice back packs (combination of three words)
  • big nice or nice back or back packs (combination of two words)
  • big or nice or back or packs (single keyword).

For this reason, if you configure a synonym with more than four terms, it's never searched. For example, don't configure a synonym phrase such as the following that has more than four terms; it's never found:

backpacks, backpack, back pack back packs rucksack ruck sack

Instead configure:

backpacks, backpack, back pack, back packs, rucksack, ruck sack
  • Negative Synonyms
    If you enter synonyms (single or multi-word) with the '-' negative synonym operator in front of it, products containing the negative synonym are not returned in B2C Commerce search results.
  • Brand Synonyms
    B2C Commerce automatically generates an internal dictionary of brand names from the values in the product system object brand attribute. Marking the brand attribute as searchable isn't required for the dictionary to be created. If B2C Commerce detects a misspelled brand name in the search query, it adds the correct brand name from the internal dictionary to the query as a synonym.

Negative Synonyms

If you enter synonyms (single or multi-word) with the '-' negative synonym operator in front of it, products containing the negative synonym are not returned in B2C Commerce search results.

Example 1

Set up a synonym group that looks like jeans, -skirts, so that a customer who is looking for a pair of jeans doesn't see skirts returned because they’re jean skirts.

Synonym Group Customer Searches For... Actual B2C Commerce Query
jeans, -skirts jeans jeans AND NOT skirts

Example 2

Set up a synonym group that looks like car accessories, -household, -technology, so if a customer searched for car accessories, the negative terms, -household and -technology are added to the query. The search result includes floor mats but not air fresheners or mobile phone cables.

However, if the customer searched for household (or -household), the term car accessories wouldn’t be searched because household wasn’t configured as synonym but as a negative term to a synonym car accessories.

Synonym Group Customer Searches For... Actual Query
car accessories, -household, -technology car accessories car accessories NOT household AND NOT technology
  household household

Example 3

Regular synonyms apply to negative queries as well. If "chukkas" and "boots" are synonyms, a customer search that does not include "chukkas" also does not include "boots".

Synonym Group Customer Searches For... Actual Query
chukkas, boots -chukkas NOT chukkas AND NOT boots
  -boots NOT chukkas AND NOT boots

Brand Synonyms

B2C Commerce automatically generates an internal dictionary of brand names from the values in the product system object brand attribute. Marking the brand attribute as searchable isn't required for the dictionary to be created. If B2C Commerce detects a misspelled brand name in the search query, it adds the correct brand name from the internal dictionary to the query as a synonym.

For example, if a site has the brand Mitsubishi and a customer enters Mitsushi, the query parser identifies the misspelling and searches for Mitsushi or Mitsubishi.

If the product system object brand attribute doesn't contain any values, no automatic brand synonyms generate and this step in query processing isn't used.

Note
Note To disable the brand synonym feature, contact Customer Support for assistance.
 
正在載入
Salesforce Help | Article