Creating a Custom Thesaurus (Enhanced Version Only)

The Verity thesaurus operator expands a search to include the specified word and its synonyms (for information on using the thesaurus operator, see “thesaurus”). In the Enhanced version of the Full-Text Search engine, you can create a custom thesaurus that contains application-specific synonyms to use in place of the default thesaurus.

For example, the default English language thesaurus contains these words as synonyms for “money”: “cash,” ”currency,” ”lucre,” ”wampum,” and ”greenbacks.” You can create a custom thesaurus that contains a different set of synonyms for “money”; for example, such as: ”bid,” ”tokens,” ”credit,” ”asset,” and ”verbal offer.”

To create a custom thesaurus, follow these steps:

  1. Make a list of the synonyms that you will use with your application. It may help to examine the default thesaurus (see “Examining the Default Thesaurus (Optional)”).

  2. Create a control file that contains the synonyms you are defining for your custom thesaurus (see “Creating the Control File”).

  3. Create the custom thesaurus using the mksyd utility (see “Creating the Thesaurus”). This uses the control file as input.

  4. Replace the default thesaurus with your custom thesaurus (see “Replacing the Default Thesaurus with the Custom Thesaurus”).

For more information on “Custom Thesaurus Support” and the mksyd utility, see the Verity Web site.

In the Enhanced version of Full-Text Search engine, two sample files illustrate how to set up and use a custom thesaurus:

These files are in the $SYBASE/$SYBASE_FTS/sample/scripts directory.