Document Presentation and Highlighting

Typically, a query application enables the user to view the documents returned by a query. The user selects a document from the hit list and then the application presents the document in some form.

With Oracle Text, you can display a document in different ways. For example, you can present documents with query terms highlighted. Highlighted query terms can be either the words of a word query or the themes of an ABOUT query in English.

You can also obtain gist (document summary) and theme information from documents with the CTX_DOC PL/SQL package.

Table 5-2 describes the different output you can obtain and which procedure to use to obtain each type.

Table 5-2 CTX_DOC Output

Output Procedure

Plain text version, no highlights


HTML version of document, no highlights


Highlighted document, plain text version


Highlighted document, HTML version


Highlight offset information for plain text version


Highlight offset information for HTML version


Theme summaries and gist of document.


List of themes in document.


Figure 5-1 shows an original document to which we can apply highlighting, gisting, and theme extraction in the following sections.

Figure 5-1 Sample Document for Highlighting, Gisting, and Theme Extraction

Description of
Description of "Figure 5-1 Sample Document for Highlighting, Gisting, and Theme Extraction"