Create a Section Group
You enable section searching by defining section groups. Use one of the system-defined section groups to create an instance of a section group.
You use section groups to specify the type of document set that you have and implicitly indicate the tag structure. Choose a section group that is appropriate for your document collection. For instance, to index HTML tagged documents, use HTML_SECTION_GROUP. Likewise, to index XML tagged documents, use XML_SECTION_GROUP.
Table 1 Types of Section Groups
| Section Group Preference | Description |
|---|---|
NULL_SECTION_GROUP |
This is the default. Use this group type when you define no sections or when you define only SENTENCE or PARAGRAPH sections. |
BASIC_SECTION_GROUP |
Use this group type for defining sections where the start and end tags are of the form Note: This group type does not support input such as unbalanced parentheses, comments tags, and attributes. Use |
HTML_SECTION_GROUP |
Use this group type to index HTML documents and for defining sections in HTML documents. |
XML_SECTION_GROUP |
Use this group type to index XML documents and for defining sections in XML documents. |
AUTO_SECTION_GROUP |
Use this group type to automatically create a zone section for each start-tag/end-tag pair in an XML document. As in XML, the section names derived from XML tags are case-sensitive. Attribute sections are created automatically for XML tags that have attributes. Attribute sections are named in the form tag@attribute. Stop sections, empty tags, processing instructions, and comments are not indexed. The following limitations apply to automatic section groups:
|
PATH_SECTION_GROUP |
Use this group type to index XML documents. This preference behaves like The difference is that you can search paths with the |
NEWS_SECTION_GROUP |
Use this group to define sections in newsgroup-formatted documents according to RFC 1036. |
Notes
-
Documents sent to the
HTML,XML,AUTO, andPATHsectioners must begin with\s*<.The\s*represents zero or more whitespace characters. Otherwise, the document is treated as a plain-text document, and no sections are recognized. -
Do not use left-angle-brackets within a section data. If a left-angle-bracket is followed by a non-blank character, then the section parser treats the free text (between the left-angle and right-angle brackets) as a tag name.
For example:
<DOCUMENT> <BODYTEXT> ABC < R1 NOMISS <R2 MISSED1 </BODYTEXT> <FIELDS> DEF <R3 MISSED2 </FIELDS> </DOCUMENT> GHI FALSEPOSITIVE JKLIn the preceding example, the section parser treats
R2 MISSED1 </BODYTEXTandR3 MISSED2 </FIELDSas tag names. This may result in false-positive hits or missed hits, which may cause the following issues:-
Any word in the
R2 MISSED1 </BODYTEXTandR3 MISSED2 </FIELDSphrases are not searchable within a section. -
Any text outside a section, such as
GHI,FALSEPOSITIVE, andJKLare wrongly included in a section if it is not closed.
-
- You use the
CTX_DDLpackage to create section groups and define sections as part of section groups. For example, to index HTML documents, create a section group withHTML_SECTION_GROUP:begin ctx_ddl.create_section_group('htmgroup', 'HTML_SECTION_GROUP'); end; -
Starting with Oracle Database 18c, use of
NEWS_SECTION_GROUPis deprecated in Oracle Text. Use external processing instead.If you want to index USENET posts, then preprocess the posts to use
BASIC_SECTION_GROUPorHTML_SECTION_GROUPwithin Oracle Text. USENET is rarely used commercially.