Lists of Themes

A list of themes is a list of the main concepts in a document. Use the CTX_DOC.THEMES procedure to generate lists of themes.

See Also: Oracle Text Reference to learn more about the command syntax for CTX_DOC.THEMES

The following in-memory theme example generates the top 10 themes for document 1 and stores them in an in-memory table called the_themes. The example then loops through the table to display the document themes.

declare
 the_themes ctx_doc.theme_tab;

begin
 ctx_doc.themes('myindex','1',the_themes, numthemes=>10);
 for i in 1..the_themes.count loop
  dbms_output.put_line(the_themes(i).theme||':'||the_themes(i).weight);
  end loop;
end;

The following example create a result table theme:

create table ctx_themes (query_id number,
                         theme varchar2(2000),
                         weight number);

In this example, you obtain a list of themes where each element in the list is a single theme:

begin
ctx_doc.themes('newsindex','34','CTX_THEMES',1,full_themes => FALSE);
end;

In this example, you obtain a list of themes where each element in the list is a hierarchical list of parent themes:

begin
ctx_doc.themes('newsindex','34','CTX_THEMES',1,full_themes => TRUE);
end;