IMPORT_THESAURUS

Use this procedure to import a thesaurus into the Oracle Text thesaurus tables. You should call ctx_output.start_log before calling import_thesaurus to log the operations done by import_thesaurus.

Syntax

CTX_THES.IMPORT_THESAURUS(name in varchar2,
                          content in CLOB,
                          thescase in varchar2 default 'N');

name

Specify the name of the thesaurus to be created. If the name of the thesaurus specified in the name parameter already exists in the Oracle Text thesaurus tables, then this procedure raises an exception.

content

Specify the thesaurus content to be imported in the Oracle Text thesaurus tables. The format of the thesaurus to be imported should be the same as used by the ctxload utility. If the format of the thesaurus to be imported is not correct, then this procedure raises an exception.

See Also:Thesaurus Loader (ctxload)” in Oracle Text Utilities for more information about the ctxload utility.

thecase

Specify 'Y' to create a case-sensitive thesaurus and 'N' to create a case-insensitive thesaurus. The default is 'N'.

Example

The following example creates a case-sensitive thesaurus named mythesaurus and imports the thesaurus content present in myclob into the Oracle Text thesaurus tables:

declare
 myclob clob;
begin
 myclob := to_clob('peking SYN beijing BT capital country NT beijing tokyo');
 ctx_thes.import_thesaurus('mythesaurus', myclob, 'Y');
end;