| PL/SQL Packages and Types Reference 10g Release 1 (10.1) Part Number B10802-01 |
|
|
View PDF |
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.
This chapter contains the following topics:
The DBMS_XDBT package can be used in the following fashion:
DROPPREFERENCES Procedure procedure.CREATEPREFERENCES Procedure procedure.CONTEXT index using the CREATEINDEX Procedure procedure.CONFIGUREAUTOSYNC Procedure procedure.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.
| Parameter | Default Value | Description |
|---|---|---|
|
|
|
Name of the stoplist. |
|
|
|
List of stopwords, in excess of |
This procedure sets up jobs for automatic SYNCs of the CONTEXT index.
DBMS_XDBT.CONFIGUREAUTOSYNC;
USER_JOBS catalog viewsAutoSyncPolicy can be set to choose an appropriate synchronization policy.The synchronization can be based on one of the following:
| Sync Basis | Description |
|---|---|
|
|
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. |
|
|
The SYNC is triggered at regular intervals. (See the SyncInterval configuration parameter). |
|
|
A combination of both of the preceding options. |
This procedure creates a user datastore preference for the CONTEXT index on the XML DB hierarchy.
DBMS_XDBT.CREATEDATASTOREPREF;
datastore preference can be modified; see the DatastorePref configuration setting.USER datastore procedure also filters the incoming document. The DBMS_XDBT package provides a set of configuration settings that control the filtering process.SkipFilter_Types array contains a list of regular expressions. Documents with a mime type that matches one of these expressions are not indexed. Some of the properties of the document metadata, such as author, remain unindexed.
NullFilter_Types array contains a list of regular expressions. Documents with a mime type that matches one of these expressions are not filtered; however, they are still indexed. This is intended to be used for documents that are text-based, such as HTML, XML and plain-text.This procedure creates a NULL filter preference for the CONTEXT index on the XML DB hierarchy.
DBMS_XDBT.CREATEFILTERPREF;
FilterPref configuration setting.USER datastore procedure filters the incoming document; see CREATEDATASTOREPREF Procedure for more details.This procedure creates the CONTEXT index on the XML DB hierarchy.
DBMS_XDBT.CREATEINDEX;
IndexName configuration setting.LogFile configuration parameter to enable ROWID logging during index creation.IndexMemory configuration parameter to determine the amount of memory that index creation, and later SYNCs, will use.This procedure creates a BASIC lexer preference for the CONTEXT index on the XML DB hierarchy.
DBMS_XDBT.CREATELEXERPREF;
lexer preference can be modified; see LexerPref configuration setting. No other configuration settings are provided.MultiLexer preferences are not supported.This procedure creates a set of default preferences based on the configuration settings.
DBMS_XDBT.CREATEPREFERENCES;
This procedure creates a section group for the CONTEXT index on the XML DB hierarchy.
DBMS_XDBT.CREATESECTIONGROUPPREF;
SectiongroupPref configuration setting.AUTO_SECTION_GROUP or the PATH_SECTION_GROUP; see the SectionGroup configuration setting.This procedure creates a stoplist for the CONTEXT index on the XML DB hierarchy.
DBMS_XDBT.CREATESTOPLISTPREF;
StoplistPref configuration setting.StopWords array is a configurable list of stopwords. These are meant to be stopwords in addition to the set of stopwords in CTXSYS.DEFAULT_STOPLIST.This procedure creates a BASIC_STORAGE preference for the CONTEXT index on the XML DB hierarchy.
DBMS_XDBT.CREATESTORAGEPREF;
StoragePref configuration setting.CONTEXT index; see the IndexTablespace configuration setting.I_INDEX_CLAUSE uses key compression.This procedure creates a wordlist preference for the CONTEXT index on the XML DB hierarchy.
DBMS_XDBT.createWordlistPref;
WordlistPref configuration setting. No other configuration settings are provided.FUZZY_MATCH and STEMMER attributes are set to AUTO (auto-language detection)This procedure drops any previously created preferences for the CONTEXT index on the XML DB hierarchy.
DBMS_XDBT.DROPPREFERENCES;