Oracle Text Reference
Release 9.0.1

Part Number A90121-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

CTX_DDL Package, 14 of 28


CREATE_SECTION_GROUP

Creates a section group for defining sections in a text column.

When you create a section group, you can add to it zone, field, or special sections with ADD_ZONE_SECTION, ADD_FIELD_SECTION, or ADD_SPECIAL_SECTION.

When you index, you name the section group in the parameter string of CREATE INDEX or ALTER INDEX.

After indexing, you can query within your defined sections with the WITHIN operator.

Syntax

CTX_DDL.CREATE_SECTION_GROUP(
  group_name     in    varchar2,
  group_type     in    varchar2
);
group_name

Specify the section group name to create as [user.]section_group_name. This parameter must be unique within an owner.

group_type

Specify section group type. The group_type parameter can be one of:

Section Group Preference  Description 

NULL_SECTION_GROUP 

Use this group type when you define no sections or when you define only SENTENCE or PARAGRAPH sections. This is the default. 

BASIC_SECTION_GROUP 

Use this group type for defining sections where the start and end tags are of the form <A> and </A>

HTML_SECTION_GROUP 

Use this group type for indexing HTML documents and for defining sections in HTML documents.  

XML_SECTION_GROUP 

Use this group type for indexing 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. The section names derived from XML tags are case sensitive as in XML.

Attribute sections are created automatically for XML tags that have attributes. Attribute sections are named in the form attribute@tag.

Stop sections, empty tags, processing instructions, and comments are not indexed.

The following limitations apply to automatic section groups:

  • You cannot add zone, field, or special sections to an automatic section group.

  • Automatic sectioning does not index XML document types (root elements.) However, you can define stop sections with document type.

  • The length of the indexed tags, including prefix and namespace, cannot exceed 64 characters. Tags longer than this are not indexed.

 

PATH_SECTION_GROUP 

Use this group type to index XML documents. Behaves like the AUTO_SECTION_GROUP.

The difference is that with this section group you can do path searching with the INPATH and HASPATH operators. Queries are also case-sensitive for tag and attribute names. 

NEWS_SECTION_GROUP 

Use this group for defining sections in newsgroup formatted documents according to RFC 1036. 

Example

The following command creates a section group called htmgroup with the HTML group type.

begin

ctx_ddl.create_section_group('htmgroup', 'HTML_SECTION_GROUP');
end;

The following command creates a section group called auto with the AUTO_SECTION_GROUP group type to be used to automatically index tags in XML documents.

begin

ctx_ddl.create_section_group('auto', 'AUTO_SECTION_GROUP');
end;

Related Topics

WITHIN operator in Chapter 3, "CONTAINS Query Operators".

"Section Group Types" in Chapter 2, "Indexing".

ADD_ZONE_SECTION

ADD_FIELD_SECTION

ADD_SPECIAL_SECTION

REMOVE_SECTION

DROP_SECTION_GROUP


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback