Synonym Processor (Query) Stage

About

This pipeline stage expands Queries to include Synonyms.

  • This stage is placed first in your list of Query stages. 
  • The Synonyms processor analyzes the submitted query and modifies the query to include Synonyms.
  • Both One-Way and Two-Way Synonyms are supported.
  • This new query is translated by the backend processor to match the syntax of the backend.

Valid CSV Format

Synonym configuration uses valid CSV format.

Example:

To include double quotes ("" "") within a synonym use:
  """KEYWORD"""

  • The processor will use "KEYWORD".   

  • Entering "KEYWORD" will use KEYWORD.

Synonym Examples

See the additional Synonym Query examples below.

Method Formate Example Description
One-Way 1,<word>, <synonym>,<synonym>,......

1, Tony, Anthony

1, William, Bill, Will

  • When "Tony" is queried, "Anthony" is also queried.
  • If "Anthony" is queried, "Tony" is not queried.
  • When "William" is queried, "Bill" and "Will" are also queried.
Two-Way 2,<word/synonym>, <word/synonym>,<word/synonym>,.....

2, Tony, Anthony

2, William, Bill, Will

  • When "Tony" or "Anthony" are queried, both words are queried.
  • When "William" or "Bill" or "Will" are queried, all three words are queried.
Mixed

1,<word>, <synonym>,<synonym>,......

2,<word/synonym>, <word/synonym>,<word/synonym>,.....

1, Tony, Anthony

2, William, Bill, Will
  • When "Tony" is queried, "Anthony" is also queried.
  • If "Anthony" is queried, "Tony" is not queried.
  • When "William" or "Bill" or "Will" are queried, all three words are queried.

Multiple Word Synonyms

The Synonym Processor is capable of using multiple word synonyms.

Multiple word synonyms are treated as exact search terms.

Example:

  2,ATC,"""Anatomical Therapeutic Chemical"""

  AND

  2,ATC,Anatomical Therapeutic Chemical

Both formats will be treated within the processor as "Anatomical Therapeutic Chemical"

To query as multiple Synonyms use the format:

  2,ATC,Anatomical,Therapeutic,Chemical

How to Add the Synonym Processor Stage and Configure It

  1. To add the Synonym Processor stage, navigate to the SmartHub Administration settings page. For example, http://<SmartHubURL>/_admin.

  2. Select the Main Backend.

  3. Select Add New Query Stage.

  4. Select Synonyms Processor from the drop-down list.

  5. Enter your parameters in the Parameters field.

  6. Click OK.


Additional Synonym Query Examples

Use the information below as additional synonym query examples.


  1. Query TextBox: ATC

      Resulting Query:  ATC OR "Anatomical Therapeutic Chemical"

  2. Query TextBox: Anatomical Therapeutic Chemical

      Resulting Query: 
     "Anatomical Therapeutic Chemical" OR ATC

  3. Query TextBox: "Anatomical Therapeutic Chemical"

      Resulting Query: 
     "Anatomical Therapeutic Chemical" OR ATC

  4. Query TextBox: Anatomical Therapeutic Chemical Compounds

      Resulting Query: 
     ("Anatomical Therapeutic Chemical" Compounds) OR (ATC Compounds)

  5. Query TextBox: "Anatomical Therapeutic Chemical" Compounds
                               or
                               Anatomical Therapeutic Chemical Compounds

      Resulting Query: 
     ("Anatomical Therapeutic Chemical" Compounds) OR (ATC Compounds)