Adding a synonym dictionary to a collection

Use the Synonym Tool to add a synonym dictionary to a specific collection. Specifying synonym groups in a synonym dictionary improves the quality of text search results.

Procedure

To add a synonym dictionary to a collection:

  1. Create a synonym XML file by specifying the synonym groups, as shown in the following example:
    <?xml version="1.0" encoding="UTF-8"?>
    <synonymgroups version="1.0">
    <synonymgroup>
      <synonym>Paixão</synonym>
      <synonym>amor</synonym>
      <synonym>flor</synonym>
      <synonym>linda</synonym>
    </synonymgroup>
    <synonymgroup>
      <synonym>worldwide patent tracking system</synonym>
      <synonym>wpts</synonym>
    </synonymgroup>
    </synonymgroups>
  2. Copy the synonym XML file to any directory on the text search server.
  3. Use the Synonym Tool to add the synonym dictionary to a collection.
    You can add a synonym dictionary in append mode or replace mode. If you add a synonym dictionary in append mode, the new synonyms will be added to the existing synonym dictionary. If you add a synonym dictionary in replace mode, the existing synonyms will be replaced by the new synonyms that you defined for the text search index.
    Option Description
    On a Linux® or Linux on IBM Z® server, enter the following command:
    synonymTool.sh importSynonym
    -synonymFile <absolute path to synonym 
    XML file>
    -collectionName <collection name>
    -replace <[true|false]>
    -configPath <absolute path to 
    configuration folder>
    
    On a Windows server, enter the following command:
    synonymTool.bat importSynonym
    -synonymFile <absolute path to synonym 
    XML file>
    -collectionName <collection name>
    -replace <[true|false]>
    -configPath <absolute path to 
    configuration folder>
    
    Note: If the value for -configPath contains blanks, you must enclose the value in quotation marks.
    If the format of the XML file is invalid, or the XML file is empty, an error code is returned.