ADD_MDATA_SECTION
Use this procedure to add an MDATA section, with an accompanying value, to an existing section group. MDATA sections cannot be added to Null Section groups, Path Section groups, or Auto Section groups.
Section values undergo a simplified normalization:
-
Leading and trailing whitespace on the value is removed.
-
The value is truncated to 255 bytes.
-
The value is indexed as a single value; if the value consists of multiple words, it is not broken up.
-
Case is preserved. If the document is dynamically generated, then implement case-insensitivity by uppercasing
MDATAvalues and making sure to search only in uppercase.
Use CTX_DDL.REMOVE_SECTION to remove sections.
Syntax
CTX_DDL.ADD_MDATA_SECTION(
group_name IN VARCHAR2,
section_name IN VARCHAR2,
tag IN VARCHAR2,
read_only IN BOOLEAN default FALSE);
group_name
Name of the section group that will contain the MDATA section.
section_name
Name of the MDATA section.
tag
The value of the MDATA section. For example, if the section is <AUTHOR>, the value could be Cynthia Kadohata (author of the novel The Floating World). More than one tag can be assigned to a given MDATA section.
read_only
FALSE (default) if you want to allow calling CTX_DDL.ADD_MDATA() and CTX_DDL.REMOVE_MDATA() for this MDATA section, and TRUE otherwise. When set to FALSE, the queries on the MDATA section run less efficiently because a cursor needs to be opened on the index table to track the deleted values for that MDATA section.
Example
This example creates an MDATA section called auth.
ctx_ddl.create_section_group('htmgroup', 'HTML_SECTION_GROUP');
ctx_ddl.add_mdata_section('htmgroup', 'auth', 'author', READ_ONLY);
Related Topics
“MDATA”
See Also: Chapter 8, “Searching Document Sections in Oracle Text” in Oracle Text Application Developer’s Guide