Skip Headers
Oracle® Database PL/SQL Packages and Types Reference
11g Release 1 (11.1)

B28419-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

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

See Also:

Oracle XML DB Developer's Guide

This chapter contains the following topics:


Using DBMS_XDBT


Overview

The DBMS_XDBT package can be used in the following fashion:


Operational Notes

The DBMS_XDBT package can be customized by using a PL/SQL procedure or an anonymous block to set the relevant package variables, configuration settings, and then execute the procedures. A more general approach would be to introduce the appropriate customizations by modifying this package in place, or as a copy. The system must be configured to use job queues, and 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.

Table 152-1 General Indexing Settings for Customizing DBMS_XDBT

Parameter Default Value Description

IndexName

XDB$CI

The name of the CONTEXT index.

IndexTablespace

XDB$RESINFO

Tablespace used by tables and indexes comprising the CONTEXT index.

IndexMemory

128M

Memory used by index creation and SYNC; less than or equal to the MAX_INDEX_MEMORY system parameter (see the CTX_ADMIN package).

LogFile

'XdbCtxLog'

The log file used for ROWID during indexing. The LOG_DIRECTORY system parameter must be set already. NULL turn s off ROWID logging.


Table 152-2 Filtering Settings for Customizing DBMS_XDBT

Parameter Default Value 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.


Table 152-3 Stoplist Settings for Customizing DBMS_XDBT

Parameter Default Value Description

StoplistPref

XDB$CI_STOPLIST

Name of the stoplist.

StopWords

0..9; 'a'..'z'; 'A'..'Z'

List of stopwords, in excess of CTXSYS.DEFAULT_STOPLIST.


Table 152-4 Sectioning and Section Group Settings for Customizing DBMS_XDBT

Parameter Default Value Description

SectionGroup

HTML_SECTION_GROUP

Default sectioner. Use PATH_SECTION_GROUP or AUTO_SECTION_GROUP if repository contains mainly XML documents.

SectiongroupPref

XDB$CI_SECTIONGROUP

Name of the section group.


Table 152-5 Other Index Preference Settings for Customizing DBMS_XDBT

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.


Table 152-6 SYNC (CONTEXT Synchronization) Settings for Customizing DBMS_XDBT

Parameter Default Value Description

AutoSyncPolicy

SYNC_BY_PENDING_COUNT

Indicates when the index should be SYNCed. 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 before an index SYNC is triggered. Only if the AutoSyncPolicy is SYNC_BY_PENDING_COUNT or SYNC_BY_PENDING_COUNT_AND_TIME.

CheckPendingCountInterval

10 minutes

How often, in minutes, the pending queue should be checked. Only if the AutoSyncPolicy is SYNC_BY_PENDING_COUNT or SYNC_BY_PENDING_COUNT_AND_TIME.

SyncInterval

60 minutes

Indicates how often, in minutes, the index should be SYNCed. Only if the AutoSyncPolicy is SYNC_BY_TIME or SYNC_BY_PENDING_COUNT_AND_TIME



Summary of DBMS_XDBT Subprograms

Table 152-7 DBMS_XDBT Package Subprograms

Subprogram Description

CONFIGUREAUTOSYNC Procedure

Configures the CONTEXT index for automatic maintenance, SYNC

CREATEDATASTOREPREF Procedure

Creates a USER datastore preference for the CONTEXT index

CREATEFILTERPREF Procedure

Creates a filter preference for the CONTEXT index

CREATEINDEX Procedure

Creates the CONTEXT index on the XML DB hierarchy

CREATELEXERPREF Procedure

Creates a lexer preference for the CONTEXT index

CREATEPREFERENCES Procedure

Creates preferences required for the CONTEXT index on the XML DB hierarchy

CREATESECTIONGROUPPREF Procedure

Creates a storage preference for the CONTEXT index

CREATESTOPLISTPREF Procedure

Creates a section group for the CONTEXT index

CREATESTORAGEPREF Procedure

Creates a wordlist preference for the CONTEXT index

CREATEWORLDLISTPREF Procedure

Creates a stoplist for the CONTEXT index

DROPPREFERENCES Procedure

Drops any existing preferences



CONFIGUREAUTOSYNC Procedure

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

Syntax

DBMS_XDBT.CONFIGUREAUTOSYNC;

Usage Notes

The synchronization can be based on one of the following:

Sync Basis Description
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 of the preceding options.


CREATEDATASTOREPREF Procedure

This procedure creates a user datastore preference for the CONTEXT index on the XML DB hierarchy.

Syntax

DBMS_XDBT.CREATEDATASTOREPREF;

Usage Notes


CREATEFILTERPREF Procedure

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

Syntax

DBMS_XDBT.CREATEFILTERPREF;

Usage Notes


CREATEINDEX Procedure

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

Syntax

DBMS_XDBT.CREATEINDEX;

Usage Notes


CREATELEXERPREF Procedure

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

Syntax

DBMS_XDBT.CREATELEXERPREF;

Usage Notes


CREATEPREFERENCES Procedure

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

Syntax

DBMS_XDBT.CREATEPREFERENCES;

CREATESECTIONGROUPPREF Procedure

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

Syntax

DBMS_XDBT.CREATESECTIONGROUPPREF;

Usage Notes


CREATESTOPLISTPREF Procedure

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

Syntax

DBMS_XDBT.CREATESTOPLISTPREF;

Usage Notes


CREATESTORAGEPREF Procedure

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

Syntax

DBMS_XDBT.CREATESTORAGEPREF;

Usage Notes


CREATEWORLDLISTPREF Procedure

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

Syntax

DBMS_XDBT.CREATEWORDLISTPREF;

Usage Notes


DROPPREFERENCES Procedure

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

Syntax

DBMS_XDBT.DROPPREFERENCES;