POLICY_THEMES
Generates a list of themes for a document. With this procedure, no CONTEXT index is required.
Syntax
ctx_doc.policy_themes(policy_name in VARCHAR2,
document in [VARCHAR2|CLOB|BLOB|BFILE],
restab in out nocopy theme_tab,
full_themes in BOOLEAN default FALSE,
num_themes in number default 50
language in VARCHAR2 default NULL,
format in VARCHAR2 default NULL,
charset in VARCHAR2 default NULL
);
policy_name
Specify the policy you create with CTX_DDL.CREATE_POLICY.
document
Specify the document for which to generate a list of themes.
restab
Specify the name of the theme_tab PL/SQL index-by-table type.
See Also: “THEMES” for more information about the structure of the theme_tab type.
full_themes
Specify whether this procedure generates a single theme or a hierarchical list of parent themes (full themes) for each document theme.
Specify TRUE for this procedure to write full themes to the THEME column of the result table.
Specify FALSE for this procedure to write single theme information to the THEME column of the result table. This is the default.
num_themes
Specify the maximum number of themes to retrieve. For example, if you specify 10, up to first 10 themes are returned for the document. The default is 50.
If you specify 0 or NULL, this procedure returns all themes in a document. If the document contains more than 50 themes, only the first 50 themes show conceptual hierarchy.
language
Specify the language of the document. Use an Oracle Text supported language value as you would in the language column of the base table. See “MULTI_LEXER” in Oracle Text Indexing Elements.
format
Specify the format of the document. Use an Oracle Text supported format value, either TEXT, BINARY or IGNORE as you would specify in the format column of the base table. For more information, see the format column description in “CREATE INDEX” in Oracle Text SQL Statements and Operators .
charset
Specify the character set of the document. Use an Oracle Text supported value as you would specify in the charset column of the base table. See “Filter Types”.
Example
Create a policy:
exec ctx_ddl.create_policy('mypolicy');
Run themes:
declare
la varchar2(200);
rtab ctx_doc.theme_tab;
begin
ctx_doc.policy_themes('mypolicy',
'To define true madness, What is''t but to be nothing but mad?', rtab);
for i in 1..rtab.count loop
dbms_output.put_line(rtab(i).theme||':'||rtab(i).weight);
end loop;
end;