14.8 Example of Loading a Thesaurus with the CTX_THES.IMPORT_THESAURUS PL/SQL procedure

This example creates a case-sensitive thesaurus named mythesaurus and imports the thesaurus content 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;

The format of the thesaurus to be imported (myclob in this example) should be the same as the format in the ctxload utility. If the format of the thesaurus to be imported is not correct, then IMPORT_THESAURUS raises an exception.