To create your own thesaurus, your first step is to define its content in a definition file using a text editor.
Restrictions. The length of the file name, including the extension, must not exceed 256 characters. You can have several thesauri in the same directory, but it is recommended that you have a separate directory for each thesaurus.
A sample English thesaurus definition file nsesamplethes.def is provided. The thesaurus directory for Windows systems is:
<sqllib>\db2ext\thes
On UNIX systems, the thesaurus directory is:
<instance_owner_home>/sqllib/db2ext/thes
Here are the first few definition groups from that file:
Figure 29. An extract from the sample thesaurus definition file
:WORDS accounting .RELATED_TO account checking .RELATED_TO sale management .SYNONYM_OF account .SYNONYM_OF accountant :WORDS acoustics .RELATED_TO signal processing :WORDS aeronautical equipment .SYNONYM_OF turbocharger .SYNONYM_OF undercarriage :WORDS advertising .RELATED_TO sale promotion .SYNONYM_OF advertisement : : : |
For the syntax of each definition group, see Chapter 18, Thesaurus support.
Each member must be written to a single line. Each associated term must be preceded by the relation name. If the member terms are related to each other, specify a member relation.
The length of the member terms and associated terms is restricted to 64 characters. Single-byte characters and double-byte characters of the same letter are regarded as the same. Capital and small letters are not distinct. A term can contain a blank character and either a single-byte character period "." or colon ":" can be used.
The user-defined relations are all based on the associative type. They are identified by unique numbers between 1 and 128.