Oracle Text Thesaurus Creation and Maintenance

Thesauruses and thesaurus entries can be created, modified, deleted, imported, and exported by all Oracle Text users with the CTXAPP role.

This section contains the following topics.

CTX_THES Package

To maintain and browse your thesaurus programatically, you can use the PL/SQL package, CTX_THES. With this package, you can browse terms and hierarchical relationships, add and delete terms, add and remove thesaurus relations, and import and export thesaurus in and out of the thesaurus tables.

Thesaurus Operators

You can also use the thesaurus operators in the CONTAINS clause to expand query terms according to your loaded thesaurus. For example, you can use the SYN operator to expand a term such as dog to its synonyms as follows:

'syn(dog)'

ctxload Utility

The ctxload utility can be used for loading thesauruses from a plain-text file into the thesaurus tables, as well as dumping thesauruses from the tables into output (or dump) files.

The thesaurus dump files created by ctxload can be printed out or used as input for other applications. The dump files can also be used to load a thesaurus into the thesaurus tables. This can be useful for using an existing thesaurus as the basis for creating a new thesaurus.

WARNING:

To ensure sound security practices, Oracle recommends that you enter the password for ctxload using the interactive mode, which prompts you for the user password. Oracle strongly recommends that you do not enter a password on the command line.

Note:

You can also programatically import and export thesaurus in and out of the thesaurus tables using the PL/SQL package CTX_THES procedures IMPORT_THESAURUS and EXPORT_THESAURUS.

Refer to Oracle Text Reference for more information about these procedures.