ALTER_THESAURUS

Use this procedure to rename or truncate an existing thesaurus. Only the thesaurus owner or CTXSYS can invoke this function on a given thesaurus.

Syntax

CTX_THES.ALTER_THESAURUS(tname     in   varchar2,
                          op       in   varchar2,
                          operand  in   varchar2 default null);

tname

Specify the thesaurus name.

op

Specify the alter operation as a string or symbol. You can specify one of two operations:

op Meaning operand

RENAME

or

CTX_THES.OP_RENAME

Rename thesaurus. Returns an error if the new name already exists. Specify a new thesaurus name.

TRUNCATE

or

CTX_THES.OP_TRUNCATE

Truncate thesaurus. None.

operand

Specify the argument to the alter operation. See table for op.

Examples

Rename thesaurus THES1 to MEDICAL:

ctx_thes.alter_thesaurus('thes1', 'rename', 'medical');

or

ctx_thes.alter_thesaurus('thes1', ctx_thes.op_rename, 'medical');

You can use symbols for any op argument, but all further examples will use strings.

Remove all phrases and relations from thesaurus THES1:

ctx_thes.alter_thesaurus('thes1', 'truncate');