CREATE_INDEX_SCRIPT
Creates a SQL*Plus script which will create a text index that duplicates the named text index.
The created script will include creation of preferences identical to those used in the named text index. However, the names of the preferences will be different.
You can call this operation as a procedure with an IN OUT CLOB parameter or as a function that returns the report as a CLOB.
Syntax
procedure CTX_REPORT.CREATE_INDEX_SCRIPT(
index_name in varchar2,
report in out nocopy clob,
prefname_prefix in varchar2 default null
);
function CTX_REPORT.CREATE_INDEX_SCRIPT(
index_name in varchar2,
prefname_prefix in varchar2 default null
) return clob;
index_name
Specify the name of the index.
report
Specify the CLOB locator to which to write the script.
If report is NULL, a session-duration temporary CLOB will be created and returned. It is the caller’s responsibility to free this temporary CLOB as needed.
The report CLOB will be truncated before report is generated, so any existing contents will be overwritten by this call.
prefname_prefix
Specify optional prefix to use for preference names.
If prefname_prefix is omitted or NULL, index name will be used. The prefname_prefix follows index length restrictions.
Notes
CTX_REPORT.CREATE_INDEX_SCRIPT will also generate necessary FILTER BY and ORDER BY clauses for CREATE INDEX statements.