Creating and editing synonyms

Synonyms management screen

The example below shows the configured synonyms.

synonyms manage
  • Synonym detail: Provides a summary of the synonym transformation. Clicking on the synonym opens the synonyms edit screen that allows you to edit the synonym.

  • Status: Indicates the publication status of the synonym and provides buttons to publish or unpublish the synonym.

  • Clone (): Makes a copy of the selected synonym that can be edited and turned into a new synonym.

  • Delete (): Deletes the selected synonym

  • Add new: Opens the synonyms add screen allowing one or more synonyms to be added.

  • Publish all / unpublish all:

Synonyms add screen

synonyms new
  1. When these keywords are submitted: Defines the keywords or match pattern that triggers the synonym.

  2. Transform them to: Defines what the matched query terms are transformed to. The value of this field must be a specified using the Funnelback query language (and query language operators can be used in the expression).

  3. Apply the transformation if: Controls how the keywords entered into the when these keywords are submitted field are compared to the query.

    All words must be present, in any order

    Any matching term in the search keywords will trigger the synonym. For example, consider setting jobs to expand to [positions vacancies]. The query overseas jobs in australia would be expanded to overseas [positions vacancies] in australia.

    This match type is only designed to work with a single word entered into the When these keywords are submitted field. If you specify a multi-word trigger the behaviour will be inconsistent as the multi-word trigger is treated as a phrase when matching against the query.
    Search keyword(s) exactly matches

    The whole of the search keywords must exactly match. For example, consider setting jobs to expand to [positions vacancies]. With an exact match, the query jobs would expand to [positions vacancies], whereas the query overseas jobs would remain as-is.

    Regular expression

    Expands any part of the given query that matches a particular regular expression. For example, using j.+ would apply the synonym to all words starting with the j letter. This is an advanced type that requires regular expression knowledge.

  4. Remove this synonym: Removes the synonym.

  5. Add another synonym: Adds another row to the editing table, allowing you to quickly add several synonyms in one operation.

  6. Return to the synonyms listing screen: Returns to the synonyms listing page.

  7. Add: Adds all the new synonyms shown on the current screen.

Synonyms edit screen

The synonyms editor enables you to edit the fields for an individual synonym.

synonyms edit

See synonyms add screen for a description of the fields.

Common usage scenarios

The following are the main usages of synonyms.

Expand a search term to also search for synonyms of the word

Problem: there are various words used within the content that all mean the same thing. Add a synonym so it doesn’t matter which word is used when running the search.

Create a synonym for each word that expands the query to search for each of the words.

e.g. courgette and zucchini are two words that describe the same vegetable. Configure a synonym that allows a user to input either word and get the same set of results.

Create two synonyms.

  1. Expand courgettecourgette OR zucchini

    • When these keywords are submitted: courgette

    • Transform them to: [courgette zucchini]

      Square brackets are used in the Funnelback query language to indicate an OR between the words. The above example will find pages that contain either the word courgette, the word zucchini or both of the words.
    • Apply the transformation if: all words must be present in the search keyword(s) in any order

  2. Expand zucchinicourgette OR zucchini

    • When these keywords are submitted: zucchini

    • Transform them to: [courgette zucchini]

    • Apply the transformation if: all words must be present in the search keyword(s) in any order

Alternatively use a regular expression match to achieve the same result. See: Create a synonym that has multiple triggers below.

Expand an acronym or abbreviation

Problem: acronyms are often used within the content.

e.g. Content writers often refer to the city of Los Angeles as LA. Create an acronym that expands the acronym.

  1. Expand LALos Angeles

    • When these keywords are submitted: LA

    • Transform them to: "Los Angeles"

      Double quotes are used in the Funnelback query language to indicate a phrase match. The above example will find pages that contain the phrase Los Angeles.
    • Apply the transformation if: all words must be present in the search keyword(s) in any order

Fix a known misspelling

Problem: the analytics shows that users often misspell a specific word.

e.g. Users commonly misspell words. Funnelback will print a did you mean? message above the search results if it has a spelling suggestion but if you identify commonly misspelt words you can add a synonym to automatically correct the word.

  1. Expand govermentgovernment

    • When these keywords are submitted: goverment

    • Transform them to: government

    • Apply the transformation if: all words must be present in the search keyword(s) in any order

Query blending can be used to automatically search for any spelling suggestions returned by Funnelback.

Convert user terms into the terms used by your organization

Problem: organizations often use language that their customers don’t know or use and this means that content is not easily found.

e.g. A government website constantly refers to a form 43 that must be submitted by users. Imagine that this form is visa application form. Create a synonym that equates searches for visas to return this form.

  1. Expand visaform 43

    • When these keywords are submitted: visa

    • Transform them to: [visa "form 43"]

      Double quotes are used in the Funnelback query language to indicate a phrase match. Square brackets indicate an OR between the words. The above example will find pages that contain either the word visa, the phrase form 43 or both of the words.
    • Apply the transformation if: all words must be present in the search keyword(s) in any order

Create a synonym that has multiple triggers

Synonym expansions only support a single trigger expression.

Sometimes you wish to create a synonym expansion that performs the same transformation on different trigger keywords. e.g. when someone searches for murder OR homicide OR manslaughter then run a search for murder OR homicide or manslaughter. This has the effect of equating the three search keywords so that you get the same set of search results regardless of which keyword you search on.

To achieve this you have two options:

Option 1: Clone your synonym for each different trigger
  1. Create a synonym for the first keyword to expand to the full set of keywords. e.g. homicide[homicide murder manslaughter]

  2. Clone the synonym for the number of different keywords (in this case twice) and update the trigger terms so that you have three synonyms defined:

    • homicide[homicide murder manslaughter]

    • murder[homicide murder manslaughter]

    • manslaughter[homicide murder manslaughter]

  3. Click the add button to add the synonyms.

Option 2: (advanced) Provide a regular expression trigger that matches multiple trigger terms
  1. Create a synonym that specifies a regular expression for the when keywords are submitted field. The expression needs to match all 3 keywords. This allows you to input a single synonym that has different trigger words, but expands to the same query.

    • (?i)\bhomicide\b|\bmurder\b|\bmanslaughter\b[homicide murder manslaughter]

      Regular expressions are case-sensitive by default and will match within a word. To ensure the three specified words are matched (as words) we have included word boundaries (\b) in the expression and also configured the expression to be case-insensitive by prefixing the expression with (?i).
  2. Click the add button to add the synonym.

Tutorials

The synonyms management screens can be accessed from both dashboards.

Create and edit synonyms from the insights dashboard

Tutorial: Synonyms

  1. Log in to the insights dashboard and select the foodista results page. Open the synonyms editor by selecting synonyms from the left hand menu or by clicking on the synonyms tile.

  2. The synonyms listing screen loads and is very similar to the screen used for listing best bets. Create a new synonym by clicking the add new button.

    exercise synonyms md 01
  3. The synonyms editor screen appears allowing the quick entry of multiple synonyms. Create synonyms rules to equate the words coriander, cilantro and chinese parsley. This requires the creation of three rules that expand each of the words into a search for any of the three words. Add a rule with the following:

    • When these keywords are submitted: coriander

    • Transform them to: [coriander cilantro "chinese parsley"]

    • Apply the transformation if: all words must be present in the search keyword(s), in any order

      exercise synonyms md 02
  4. The first column contains the trigger term (coriander) and is compared with the search query entered by the user. If a match is found (as per the match type in the third column) then the term is transformed to the value in the second column. The square brackets indicate that the terms should be ORed together, and the quotes indicate that the words contained within should be treated as a phrase (so count as a single word).

    With this in mind the synonym translates as:

    If the word coriander appears anywhere within the user’s query then search for coriander OR cilantro OR "chinese parsley".

    So a search for coriander soup would result in a search for (coriander OR cilantro OR "chinese parsley") soup.

    Click the add button to add all the synonyms that have been entered on the new synonyms screen.

  5. The synonyms listing screen loads showing the defined synonyms:

    exercise synonyms md 03
  6. Test the synonym by searching for coriander from the search box at the top of the insights dashboard screen, ensuring the preview option is selected from the drop down menu. Observe that the search results include items for cilantro, and that cilantro is also highlighted in the search results.

    exercise synonyms md 04
  7. Create additional synonyms for cilantro and chinese parsley so that searches for any of these terms result in expansion to all three words. Enter both synonyms then click the add button. Don’t forget to set the match type. When entering the chinese parsley trigger enclose this in quotes to ensure that the match is treated as a phrase and only occurs when the word chinese is immediately followed by parsley.

    exercise synonyms md 05
  8. The synonyms listing updates to list all three synonyms.

    exercise synonyms md 06
  9. Publish all the synonyms by clicking the publish all button.

Create and edit synonyms from the search dashboard

The synonyms editor is part of the insights dashboard. When you choose the option to edit your synonyms from the search dashboard you will be redirected to the synonyms screen inside the insights dashboard.

Tutorial: Synonyms

This exercise shows how you can use synonyms to alter the words entered by a user when they run a search.

  1. Log in to the administration interface and select the inventors reults page. Open the synonyms editor by selecting customise synonyms from the customise tab, or switching to the insights dashboard and selecting synonyms from the left hand menu or by clicking on the synonyms tile.

  2. The synonyms listing screen loads and is very similar to the screen used for listing best bets. Create a new synonym by clicking the add new button.

    exercise synonyms 01
  3. The synonyms editor screen appears allowing the quick entry of multiple synonyms. Create synonyms rules to equate the words nappy and diaper. This requires the creation of three rules that expand each of the words into a search for any of the two words. Add a rule with the following:

    • When these keywords are submitted: nappy

    • Transform them to: [nappy diaper]

    • Apply the transformation if: all words must be present in the search keyword(s), in any order

    exercise synonyms 02

    The first column contains the trigger term (nappy) and is compared with the search query entered by the user. If a match is found (as per the match type in the third column) then the term is transformed to the value in the second column. The square brackets indicate that the terms should be ORed together.

    With this in mind the synonym translates as:

    If the word nappy appears anywhere within the user’s query then search for nappy OR diaper.

    To ensure the words are equated add a second synonym that provides the same expansion, but when diaper is the trigger word.

  4. Add another synonym with the following details:

    • When these keywords are submitted: "white out"

    • Transform them to: ["liquid paper" "white out"]

    • Apply the transformation if: the search keyword(s) exactly matches

    The quotes tell Funnelback to treat the phrase as a single word for the purposes of the expansion.

    With this in mind the synonym translates as:

    If the query matches the phrase white out exactly then search for "liquid paper" OR "white out"

  5. Press the add button. The synonyms screen loads showing the defined synonyms:

    exercise synonyms 03
  6. Test the synonym by searching for nappy from the search box at the top of the insights dashboard screen, ensuring the preview option is selected from the drop-down menu. Observe that the search results include items for diaper. If the word nappy appeared anywhere in the search results then it would be highlighted along with the word diaper.

  7. Publish all the synonyms by clicking the publish all button.