Oracle8i interMedia Text Reference
Release 2 (8.1.6)

Part Number A77063-01

Library

Product

Contents

Index

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

Indexing, 8 of 11


Section Group Types

In order to issue WITHIN queries on document sections, you must create a section group before you define your sections. You specify your section group in the parameter string of CREATE INDEX.

To create a section group, you can specify one of the following group types with CTX_DDL.CREATE_SECTION_GROUP:

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 <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.

 

NEWS_SECTION_GROUP 

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

Section Group Examples

HTML Documents

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;

You can optionally add sections to this group using CTX_DDL.ADD_SECTION. To index your documents, you can issue a statement such as:

create index myindex on docs(htmlfile) indextype is ctxsys.context 
parameters('filter ctxsys.null_filter section group htmgroup');

XML Documents

The following command creates a section group called xmlgroup with the XML_SECTION_GROUP group type.

begin
ctx_ddl_create_section_group('xmlgroup', 'XML_SECTION_GROUP');
end;

You can optionally add sections to this group using CTX_DDL.ADD_SECTION. To index your documents, you can issue a statement such as:

create index myindex on docs(htmlfile) indextype is ctxsys.context 
parameters('filter ctxsys.null_filter section group xmlgroup');

Automatic Sectioning in XML Documents

The following command creates a section group called auto with the AUTO_SECTION_GROUP group type. This section group automatically creates sections from tags in XML documents.

begin
ctx_ddl_create_section_group('auto', 'AUTO_SECTION_GROUP');
end;

create index myindex on docs(htmlfile) indextype is ctxsys.context 
parameters('filter ctxsys.null_filter section group auto');


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

All Rights Reserved.

Library

Product

Contents

Index