Search Results policy_languages
Overview
CTX_DOC is a standard Oracle Text PL/SQL package owned by the CTXSYS schema and shipped as part of the Oracle Text (interMedia Text) option. In Oracle EBS 12.1.1 and 12.2.2, it provides the server-side API used to extract, filter, summarize, mark up, and analyze the content of documents indexed by Oracle Text. Rather than returning a raw score or hit list like CTX_QUERY or CTX_CONTAINS, CTX_DOC exposes the semantic content of a document: its themes, tokens, gists, highlights, and marked-up representations. The package is registered as VALID in the EBS environment and is classified under the ETRM as an "OTHER" API. Its primary consumers within EBS are the iMarketing and iSupport modules, specifically IEM_EMAIL_PROC_PVT and IEM_TEXT_PVT, which use text-processing primitives to render content, build e-mail bodies, and produce summaries and highlighted text for end users. The package also has internal dependencies within CTXSYS itself (CTX_ADM, DRVDOC, DRVLSB, DRIENTL) that support index and document processing infrastructure.
Key Procedures and Functions
The documented interface exposes roughly seventy procedures and functions. They fall into several functional families:
- Key type control: SET_KEY_TYPE and GET_KEY_TYPE configure and report how document keys supplied to other CTX_DOC calls are interpreted (for example, as ROWIDs or primary-key values).
- Themes and policy themes: THEMES returns the main concepts of a document, while POLICY_THEMES returns themes constrained by a knowledge-base policy.
- Tokens and stemming: TOKENS extracts tokens from a document; POLICY_TOKENS, POLICY_STEMS, POLICY_NOUN_PHRASES, POLICY_LANGUAGES, and POLICY_PART_OF_SPEECH return linguistic analysis results (tokens, stems, noun phrases, identified languages, and parts of speech) under a named policy.
- Summarization: GIST and POLICY_GIST produce a summary or gist of a document, optionally governed by a policy.
- Filtering: FILTER and POLICY_FILTER extract plain text from a binary or formatted document (PDF, Word, and similar) into a character buffer or CLOB.
- Highlighting: HIGHLIGHT, HIGHLIGHT_CLOB_QUERY, POLICY_HIGHLIGHT, and POLICY_HIGHLIGHT_CLOB_QUERY return a document with query terms highlighted, supporting both VARCHAR2/CLOB and query-based variants.
- Markup: MARKUP and MARKUP_CLOB_QUERY return a document annotated with XML/HTML tags indicating where the search terms occur.
These procedures accept parameters such as a document identifier, index name, policy name, and result buffer; consult the Oracle Text Reference for exact signatures before invoking them from custom code.
Tables Accessed
The ETRM metadata records a single table accessed by CTX_DOC: PLITBLM via an APPS synonym. PLITBLM is the Oracle Text "phrase and token" auxiliary table used in word and theme processing; CTX_DOC reads from it during linguistic and policy-driven operations. In practice, most CTX_DOC routines also operate on the Dr$* index tables and on the text columns of the source application table that owns the indexed document, but those objects are not enumerated in the dependency metadata and are accessed through the Oracle Text infrastructure rather than as direct CTX_DOC dependencies.
Usage Notes
CTX_DOC is not exposed to end users through standard EBS forms; it is invoked programmatically. Typical invocation points include:
- EBS application code such as IEM_TEXT_PVT and IEM_EMAIL_PROC_PVT, which call CTX_DOC routines to generate gists, highlights, and tokens for iMarketing content.
- Concurrent programs that produce document summaries or filtered text for downstream processing.
- Custom Oracle Text solutions built on top of the EBS schema, where developers call CTX_DOC to filter documents before indexing, or to highlight search terms in a result page.
Because ownership rests with CTXSYS, any custom call must be made through a synonym or with the appropriate EXECUTE grant. The package body is large (70+ documented entry points) and references internal CTXSYS infrastructure; modifications or wrapping should be limited to calling the documented procedures rather than altering the package itself. When using CTX_DOC in 12.1.1 or 12.2.2, ensure the relevant Oracle Text indexes exist and that the base table has the appropriate primary key or ROWID for key-type resolution.
-
PACKAGE: CTXSYS.CTX_DOC
12.2.2
-
PACKAGE: CTXSYS.CTX_DOC
12.1.1