ADD_MDATA_COLUMN
Use this procedure to map the FILTER BY column named in column_name to the MDATA section named in section_name.
Syntax
The syntax is as follows:
CTX_DDL.ADD_MDATA_COLUMN(
group_name IN VARCHAR2,
section_name IN VARCHAR2,
column_name IN VARCHAR2,
);
group_name
Name of the group that contains the section.
section_name
Name of the MDATA section.
column_name
Name of the FILTER BY column to add to the MDATA section.
Note: The column_name must not be prefixed by the owner, schema or table name.
Restrictions
MDATA sections that are created with CTX_DDL.ADD_MDATA_COLUMN cannot have their values changed using CTX_DDL.ADD_MDATA or CTX_DDL.REMOVE_MDATA. Doing so will result in errors being returned. The section values must be updated using SQL.
Notes
-
The stored datatype for
MDATAsections istext. Therefore, the value of theFILTERBYcolumn is converted totextduring indexing. For non-text datatypes, theFILTERBYcolumns are normalized to an internal format during indexing. If the section is queried with anMDATAoperator, then theMDATAquery string will also be normalized to the internal format before processing. -
When a
FILTERBYcolumn is mapped asMDATA, the cost-based optimizer in Oracle Text tries to avoid using the Oracle Text composite domain index to process range predicate(s) on thatFILTERBYcolumn. This is because range predicates onMDATAFILTERBYcolumns are processed less efficiently than if they were declared asSDATA. For this reason, you should not add aFILTERBYcolumn asMDATAif you plan to do range searches on the column.
Related Topics
“MDATA”
See Also: Chapter 8, “Searching Document Sections in Oracle Text” in Oracle Text Application Developer’s Guide