Skip Headers

Oracle9i XML API Reference - XDK and Oracle XML DB
Release 2 (9.2)

Part Number A96616-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 next page

33
Managing ConText Indexes: DBMS_XDBT in PL/SQL

The DBMS_XDBT Package enables an administrator to create a ConText index on the XML DB hierarchy and configure it for automatic maintenance.

This chapter contains the following sections:


DBMS_XDBT Package


Description of DBMS_XDBT

The DBMS_XDBT package provides a convenient mechanism for administrators to set up a ConText index on the Oracle XML DB Hierarchy. The package contains procedures to create default preferences, create the index and set up automatic synchronization of the context index

The DBMS_XDBT package also contains a set of package variables that describe the configuration settings for the index. These are intended to cover the basic customizations that installations may require, but is by no means a complete set.

The DBMS_XDBT package can be used in the following fashion:


Procedures and Functions of DBMS_XDBT

Table 33-1 Summary of Procedures and Functions of DBMS_XDBT  
Procedure/Function Description

dropPreferences()

Drops any existing preferences.

createPreferences()

Creates preferences required for the ConText index on the XML DB hierarchy.

createDatastorePref()

Creates a USER datastore preference for the ConText index.

createFilterPref()

Creates a filter preference for the ConText index.

createLexerPref()

Creates a lexer preference for the ConText index.

createWordlistPref()

Creates a stoplist for the ConText index.

createStoplistPref()

Creates a section group for the ConText index.

createStoragePref()

Creates a wordlist preference for the ConText index.

createSectiongroupPref()

Creates a storage preference for the ConText index.

createIndex()

Creates the ConText index on the XML DB hierarchy.

configureAutoSync()

Configures the ConText index for automatic maintenance (SYNC).

dropPreferences()

Description

This procedure drops any previously created preferences for the ConText index on the XML DB hierarchy.

Syntax

PROCEDURE dropPreferences;

createPreferences()

Description

This procedure creates a set of default preferences based on the configuration settings.

Syntax

PROCEDURE createPreferences;

createDatastorePref()

Description

This procedure creates a USER datastore preference for the ConText index on the XML DB hierarchy.

Syntax

PROCEDURE createDatastorePref;

createFilterPref()

Description

This procedure creates a NULL filter preference for the ConText index on the XML DB hierarchy.

Syntax

PROCEDURE createFilterPref;

createLexerPref()

Description

This procedure creates a BASIC lexer preference for the ConText index on the XML DB hierarchy.

Syntax

PROCEDURE createLexerPref;

createWordlistPref()

Description

This procedure creates a wordlist preference for the ConText index on the XML DB hierarchy.

Syntax

PROCEDURE createWordlistPref;

createStoplistPref()

Description

This procedure creates a stoplist for the ConText index on the XML DB hierarchy.

Syntax

PROCEDURE createStoplistPref;

createStoragePref()

Description

This procedure creates a BASIC_STORAGE preference for the ConText index on the XML DB hierarchy.

Syntax

PROCEDURE createStoragePref;

createSectiongroupPref()

Description

This procedure creates a section group for the ConText index on the XML DB hierarchy.

Syntax

PROCEDURE createSectiongroupPref;

createIndex()

Description

This procedure creates the ConText index on the XML DB hierarchy.

Syntax

PROCEDURE createIndex;

Notes

configureAutoSync()

Description

This procedure sets up jobs for automatic SYNCs of the ConText index.

The synchronization can be based on one of the following:

SYNC_BY_PENDING_COUNT

The SYNC is triggered when the number of documents in the pending queue is greater than a threshold (See the MaxPendingCount configuration setting) The pending queue is polled at regular intervals (See the CheckPendingCountInterval configuration parameter) to determine if the number of documents exceeds the threshold

SYNC_BY_TIME

The SYNC is triggered at regular intervals. See the SyncInterval configuration parameter.

SYNC_BY_PENDING_COUNT_AND_TIME

A combination of both SYNC_BY_PENDING_COUNT and SYNC_BY_TIME

Syntax

PROCEDURE configureAutoSync;

Customizing the DBMS_XDBT package

The DBMS_XDBT package can be customized in one of two ways.

Please note that the system must be configured to use job queues, and that the jobs can be viewed through the USER_JOBS catalog views.

This section describes the configuration settings, or package variables, available to customize the DBMS_XDBT package.

General Indexing Settings

The following table lists configuration settings that are relevant to general indexing.

Parameter Default Values Description

IndexName

XDB$CI

The name of the ConText index.

IndexTablespace

XDB$RESINFO

The tablespace used by tables and indexes comprising the ConText index.

IndexMemory

128M

Memory used by index creation and Sync. This must be less than (or equal to) the MAX_INDEX_MEMORY system parameter. The MAX_INDEX_MEMORY system parameter (see the CTX_ADMIN package) must be greater than or equal to the IndexMemory setting.

LogFile

'XdbCtxLog'

The logfile used for ROWID logging during index creation. The LOG_DIRECTORY system parameter must be set already. Set this to NULL to turn off ROWID logging. The LOG_DIRECTORY system parameter (see the CTX_ADMIN package) must be set to enable ROWID logging.

Filtering Settings

The following table lists configuration settings that control the filtering of documents in the XML DB hierarchy.

Parameter Default Value(s) Description

SkipFilter_Types

image/%,

audio/%,

video/%,

model/%

List of mime types that should not be indexed.

NullFilter_Types

text/plain,

text/html,

text/xml

List of mime types that do not need to use the INSO filter. Use this for text-based documents.

FilterPref

XDB$CI_FILTER

Name of the filter preference.

Sectioning and Section Group Settings

The following table lists configuration settings relevant to the sectioner.

Parameter Default Value Description

SectionGroup

HTML_SECTION_GROUP

Default sectioner to use. Consider using PATH_SECTION_GROUP or AUTO_SECTION_GROUP if the repository contains mainly XML documents.

SectiongroupPref

XDB$CI_SECTIONGROUP

Name of the section group.

Stoplist Settings

The following table lists stoplist configuration settings.

Parameter Default Value(s) Description

StoplistPref

XDB$CI_STOPLIST

Name of the stoplist.

StopWords

0..9

'a'..'z'

'A'..'Z'

List of stopwords, in addition to stopwords specified in CTXSYS.DEFAULT_STOPLIST.

Other Preference Settings

The following table lists settings for other index preferences.

Parameter Default Value Description

DatastorePref

XDB$CI_DATASTORE

The name of the datastore preference.

StoragePref

XDB$CI_STORAGE

The name of the storage preference.

WordlistPref

XDB$CI_WORDLIST

The name of the wordlist preference.

DefaultLexerPref

XDB$CI_DEFAULT_LEXER

The name of the default lexer preference.

Index SYNC settings

The following table lists settings that control when and how the ConText index is synchronized.

Parameter Default Value(s) Description

AutoSyncPolicy

SYNC_BY_PENDING_COUNT

Indicates when the index should be SYNCed. Can be one of:

- SYNC_BY_PENDING_COUNT,

- SYNC_BY_TIME, or

- SYNC_BY_PENDING_COUNT_AND_TIME.

MaxPendingCount

2

Maximum number of documents in the CTX_USER_PENDING queue for this index before an index SYNC is triggered. Applies only if the AutoSyncPolicy is one of:

- SYNC_BY_PENDING_COUNT, or

- SYNC_BY_PENDING_COUNT_AND_TIME.

CheckPendingCountInterval

10 minutes

Indicates how often, in minutes, the pending queue should be checked. Applies only if the AutoSyncPolicy is one of:

- SYNC_BY_PENDING_COUNT, or

- SYNC_BY_PENDING_COUNT_AND_TIME.

SyncInterval

60 minutes

Indicates how often, in minutes, the index should be SYNCed. Applies only if the AutoSyncPolicy is one of:

- SYNC_BY_TIME, or

- SYNC_BY_PENDING_COUNT_AND_TIME


Go to previous page Go to next page
Oracle
Copyright © 2001, 2002 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