Knowledge Discovery 25.2
Knowledge Discovery Expert

# Activate Synonyms in a Content component

This solution is the easiest of the three synonym choices to implement, but is useful only if you require synonym matching for a maximum of approximately 100 terms. Beyond this limit, query response times experience a growing increase with the number of synonym terms, and it can have a negative impact on indexing performance.

Internal synonyms introduce the concept of expansion level; that is, the conceptual distance between synonyms. A synonym that you specify explicitly has an expansion level of zero. You can then expand the synonyms again, to get further expansions. For example, if there is a hierarchy of synonyms such that terrier expands to dog, and dog expands to animal, then:

- terrier to dog has an expansion level of zero.

- dog to animal also has an expansion level of zero.

- terrier to animal has an expansion level of one.

## Configuration

To use synonyms in a Content component, you must configure the `[Synonym]` section in the Content configuration file. In this section, you configure a list of synonym jobs, which are run at query time.

Each synonym job defines a file, which has a list of synonyms to process, and the `MaxExpandLevel`. For example:

    [Synonym]
    0=PC_Syn

    [PC_Syn]
    File=myfile.txt
    MaxExpandLevel=1

The referenced file must contain comma-separated lists of synonymous terms and phrases for a particular language type. For example, `myfile.txt` might contain synonyms for animals:

    [EnglishUTF8]
    dog,canine,puppy,hound,wolf
    cat,feline,kitten,kitty

You must also apply the `SynonymType` field property to any fields that you want to perform synonym expansion on. For example:

    [FieldProcessing]
    ...
    19=SynonymMatch

    // Specify the fields that synonym expansion will be performed on
    [SynonymMatch]
    Property=ApplySynonymMatch
    PropertyFieldCSVs=*/DRETITLE,*/DRECONTENT

    // Specify the synonym job to apply to those fields
    [ApplySynonymMatch]
    SynonymType=PC_Syn

## Usage

After synonyms have been activated, you can use them by setting the `Synonym` action parameter to `True` in the `Query` action.

Copyright 2025 Open Text
Version 25.2 | Last updated April 2025

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery 25.2

Topic Title: Activate Synonyms in a Content component