Oracle CTX_DDL
Version 12.1.0.2

General Information
Library Note Morgan's Library Page Footer
The Library is currently in the process of being upgraded from Oracle Database Version 12.1.0.1 to 12.1.0.2. Demos are being upgraded to reflect the new Container paradigm as well as EBR (Edition Based Redefinition) and may contain references to CDBs, PDBs, and other objects you may not be familiar with such as CDB_OBJECTS_AE: Welcome to 12c.

Interested in Oracle GoldenGate? Check out the IGGOUG,
Purpose Used to create and manage the preferences, section groups, and stoplists required for Text indexes.
AUTHID CURRENT_USER
Constants
Name Data Type Value
LOCK_WAIT NUMBER 0
LOCK_NOWAIT NUMBER 1
LOCK_NOWAIT_ERROR NUMBER 2
MAXTIME_UNLIMITED NUMBER 2147483647
PREFERENCE_IMPLICIT_COMMIT BOOLEAN TRUE
 
OPTLEVEL_FAST VARCHAR2(4) 'FAST'
OPTLEVEL_FULL VARCHAR2(4) 'FULL'
OPTLEVEL_MERGE VARCHAR2(5) 'MERGE'
OPTLEVEL_REBUILD VARCHAR2(7) 'REBUILD'
OPTLEVEL_TOKEN VARCHAR2(5) 'TOKEN'
OPTLEVEL_TOKEN_TYPE VARCHAR2(10) 'TOKEN_TYPE'
Data Types TYPE split_rec IS RECORD(
new_sec VARCHAR2(64)  DEFAULT NULL,
idval   VARCHAR2(100) DEFAULT NULL);

TYPE sec_rec IS RECORD(
secname VARCHAR2(500) DEFAULT NULL,
sectag  VARCHAR2(500) DEFAULT NULL);

TYPE split_tab IS TABLE OF split_rec INDEX BY BINARY_INTEGER;

TYPE sec_tab IS TABLE OF sec_rec INDEX BY BINARY_INTEGER;
Dependencies
ANYDATA DRIIXS DRVDDL
CTX_ANL DRILIST DRVDISP
CTX_QUERY DRIMLX DRVDML
DBMS_ASSERT DRIOBJ DRVLSB
DBMS_LOB DRIOPT DRVUTL
DBMS_OUTPUT DRIPARSE DRVXTAB
DBMS_SQL DRIPREF DR_DEF
DBMS_STANDARD DRISGP ODCIINDEXINFO
DBMS_XDBT DRISPL ODCINUMBERLIST
DRIACC DRIUTL ODCIRIDLIST
DRIDML DRIXMD ODCIVARCHAR2LIST
DRIENT DRUE PLITBLM
DRIG    
Documented Yes
First Available 11.2.0.1
Security Model Owned by CTXSYS with EXECUTE granted to XDB and CTXAPP
Source {ORACLE_HOME}/ctx/admin/dr0ddl.pkh
Subprograms
 
ADD_ATTR_SECTION
Add an attribute section to the group attr sections can be added only to the xml sectioner. They denote attributes whose text should be indexed ctx_ddl.add_attr_section(
group_name   IN VARCHAR2,
section_name IN VARCHAR2,
tag          IN VARCHAR2);
TBD
 
ADD_AUTO_OPTIMIZE
Undocumented ctx_ddl.add_auto_optimize(
idx_name  IN VARCHAR2,
part_name IN VARCHAR2 DEFAULT NULL,
optlevel  IN VARCHAR2 DEFAULT ctx_ddl.optlevel_merge);
TBD
 
ADD_FIELD_SECTION
Creates a filed section and assigns it to the specified section group ctx_ddl.add_field_section(
group_name   IN VARCHAR2,
section_name IN VARCHAR2,
tag          IN VARCHAR2,
visible      IN BOOLEAN DEFAULT FALSE);
TBD
 
ADD_INDEX
Adds an index to a catalog index preference ctx_ddl.add_index(
set_name       IN VARCHAR2,
column_list    IN VARCHAR2,
storage_clause IN VARCHAR2 DEFAULT NULL);
TBD
 
ADD_MDATA
Changes the MDATA value of a document

Overload 1
ctx_ddl.add_mdata(
idx_name     IN VARCHAR2,
section_name IN VARCHAR2,
mdata_value  IN VARCHAR2,
mdata_rowid  IN ROWID,
part_name    IN VARCHAR2 DEFAULT NULL);
TBD
Overload 2 ctx_ddl.add_mdata(
idx_name     IN VARCHAR2,
section_name IN VARCHAR2,
mdata_values IN sys.odcivarchar2list,
mdata_rowids IN sys.odciridlist,
part_name    IN VARCHAR2 DEFAULT NULL);
TBD
 
ADD_MDATA_COLUMN
Map the specified FILTER BY or ORDER BY column name to an MDATA section ctx_ddl.add_mdata_column(
group_name   IN VARCHAR2,
section_name IN VARCHAR2,
column_name  IN VARCHAR2);
TBD
 
ADD_MDATA_SECTION
Adds an MDATA metadata section to a document ctx_ddl.add_mdata_section(
group_name   IN VARCHAR2,
section_name IN VARCHAR2,
tag          IN VARCHAR2);
TBD
 
ADD_MVDATA_SECTION
Add a new MV Section. There is a maximum of 100 sections within a section group. ctx_ddl.add_mvdata_section(
group_name   IN VARCHAR2,  -- section group name, [user.]section_group_name
section_name IN VARCHAR2,
tag          IN VARCHAR2,  -- the unique pattern that marks the start of a section
datatype     IN VARCHAR2 DEFAULT NULL);
TBD
 
ADD_NDATA_SECTION
Adds a new NDATA section to a document ctx_ddl.add_ndata_section(
group_name   IN VARCHAR2,
section_name IN VARCHAR2,
tag          IN VARCHAR2);
TBD
 
ADD_SDATA
Change the SDATA value of a document ctx_ddl.add_sdata(
idx_name     IN VARCHAR2,
section_name IN VARCHAR2,
sdata_value  IN VARCHAR2,
sdata_rowid  IN ROWID,
part_name    IN VARCHAR2 DEFAULT NULL);
TBD
 
ADD_SDATA_COLUMN
Map the specified FILTER BY or ORDER BY column name to an SDATA section ctx_ddl.add_sdata_column(
group_name   IN VARCHAR2,
section_name IN VARCHAR2,
column_name  IN VARCHAR2);
TBD
 
ADD_SDATA_SECTION
Adds a new SDATA section to a document ctx_ddl.add_sdata_section(
group_name   IN VARCHAR2,
section_name IN VARCHAR2,
tag          IN VARCHAR2
datatype     IN VARCHAR2 DEFAULT NULL);
TBD
 
ADD_SEC_GRP_ATTR_VAL (new 12.1)
Add a section group attribute value to the list of values of an already
existing section group attribute. Must be called after set_sec_grp_attr.
ctx_ddl.add_sec_grp_attr_val(
group_name      IN VARCHAR2,
attribute_name  IN VARCHAR2,
attribute_value IN VARCHAR2);
TBD
 
ADD_SPECIAL_SECTION
Add a special section to the group special sections are not detected by tags. Instead, they are detected automatically in the document text. ctx_ddl.add_special_section(group_name   IN VARCHAR2, section_name IN VARCHAR2);
TBD
 
ADD_STOPCLASS
Add a stopclass to a stoplist ctx_ddl.add_stopclass(
stoplist_name IN VARCHAR2,
stopclass     IN VARCHAR2
stoppattern   IN VARCHAR2);
TBD
 
ADD_STOPTHEME
Add a stoptheme to a stop list ctx_ddl.add_stoptheme(stoplist_name IN VARCHAR2, stoptheme IN VARCHAR2);
TBD
 
ADD_STOPWORD
Adds a stopword to a stoplist ctx_ddl.add_stopword(
stoplist_name IN VARCHAR2,
stopword      IN VARCHAR2,
language      IN VARCHAR2 DEFAULT NULL);
TBD
 
ADD_STOP_SECTION
Add a stop section to the group stop sections can be added only to the auto sectioner. They denote those tags which should not be indexed ctx_ddl.add_stop_section(group_name IN VARCHAR2, tag IN VARCHAR2);
TBD
 
ADD_SUB_LEXER
Adds a sub-lexer to a multi-lexer preference ctx_ddl.add_sub_lexer(
lexer_name IN VARCHAR2,
language   IN VARCHAR2,
sub_lexer  IN VARCHAR2,
alt_value  IN VARCHAR2 DEFAULT NULL);
TBD
 
ADD_ZONE_SECTION
Creates a zone section and adds it to the specified section group ctx_ddl.add_zone_section(
group_name   IN VARCHAR2,
section_name IN VARCHAR2,
tag          IN VARCHAR2);
TBD
 
ALTER_INDEX
Undocumented ctx_ddl.alter_index(idx_name IN VARCHAR2, parameters IN VARCHAR2);
TBD
 
COPY_POLICY
Create a policy which is a metadata copy of an existing policy or index ctx_ddl.copy_policy(source_policy IN VARCHAR2, policy_name IN VARCHAR2);
TBD
 
CREATE_INDEX_SET
Creates an index set for CTXCAT index types. Only CTXAPP users and CTXSYS can create an index set. ctx_ddl.create_index_set(set_name IN VARCHAR2);
TBD
 
CREATE_POLICY
Create a policy to use with ORA:CONTAINS() ctx_ddl.create_policy(
policy_name   IN VARCHAR2,
filter        IN VARCHAR2 DEFAULT NULL,
section_group IN VARCHAR2 DEFAULT NULL,
lexer         IN VARCHAR2 DEFAULT NULL,
stoplist      IN VARCHAR2 DEFAULT NULL,
wordlist      IN VARCHAR2 DEFAULT NULL);
TBD
 
CREATE_PREFERENCE
A preference is created to customized a tile (framework object). A preference references a framework object. It describes how a referenced object is to be customized. Validates the preference attribute settings and raise an exception if incorrect attribute settings are found. ctx_ddl.create_preference(preference_name IN VARCHAR2, object_name IN VARCHAR2);
exec ctx_ddl.create_preference('_DATASTORE', 'USER_DATASTORE');
 
CREATE_SECTION_GROUP
Creates a section group in the Text data dictionary ctx_ddl.create_section_group(group_name IN VARCHAR2, group_type IN VARCHAR2);
TBD
 
CREATE_SHADOW_INDEX
Undocumented ctx_ddl.create_shadow_index(
idx_name         IN VARCHAR2,
parameter_string IN VARCHAR2 DEFAULT NULL,
parallel_degree  IN NUMBER   DEFAULT 1);
TBD
 
CREATE_STOP_LIST
Creates a new stoplist ctx_ddl.create_stop_list(
stoplist_name IN VARCHAR2,
stoplist_type IN VARCHAR2 DEFAULT 'BASIC_STOPLIST');
TBD
 
DELETE_MVDATA_VALUES
Delete mvdata section values ctx_ddl.delete_mvdata_values(
idx_name      IN VARCHAR2 DEFAULT NULL,
section_name  IN VARCHAR2 DEFAULT NULL,
mvdata_values IN sys.odcinumberlist,
mvdata_rowids IN sys.odciridlist,
part_name     IN VARCHAR2 DEFAULT NULL);
TBD
 
DROP_INDEX_SET
Drops an index set ctx_ddl.drop_index_set(set_name IN VARCHAR2);
TBD
 
DROP_POLICY
Drops a policy ctx_ddl.drop_policy(policy_name IN VARCHAR2);
TBD
 
DROP_PREFERENCE
Delete the specified preference from the TexTile dictionary. Raise an exception if the preference is referenced in a policy. ctx_ddl.drop_preference(preference_name IN VARCHAR2);
TBD
 
DROP_SECTION_GROUP
Deletes a section group from the Text data dictionary ctx_ddl.create_section_group(group_name IN VARCHAR2);
TBD
 
DROP_SHADOW_INDEX
Undocumented ctx_ddl.drop_shadow_index(idx_name IN VARCHAR2);
TBD
 
DROP_STOPLIST
Drop a stop list ctx_ddl.drop_stoplist(stoplist_name IN VARCHAR2);
TBD
 
EXCHANGE_SHADOW_INDEX
Undocumented ctx_ddl.exchange_shadow_index(
idx_name         IN VARCHAR2,
parameter_string IN VARCHAR2 DEFAULT NULL);
TBD
 
INSERT_MVDATA_VALUES
Insert mvdata section values in a list of documents ctx_ddl.insert_mvdata_values(
idx_name      IN VARCHAR2 DEFAULT NULL,   -- index name
section_name  IN VARCHAR2 DEFAULT NULL,
mvdata_values IN sys.odcinumberlist,      -- mvdata values
mvdata_rowids IN sys.odciridlist,         -- rowids to be updated
part_name     IN VARCHAR2 DEFAULT NULL);  -- partition name
TBD
 
OPTIMIZE_INDEX
Optimize an index ctx_ddl.optimize_index(
idx_name        IN VARCHAR2,
optlevel        IN VARCHAR2,
maxtime         IN NUMBER   DEFAULT NULL,
token           IN VARCHAR2 DEFAULT NULL,
part_name       IN VARCHAR2 DEFAULT NULL,
token_type      IN NUMBER   DEFAULT NULL,
parallel_degree IN NUMBER   DEFAULT 1,
memory          IN VARCHAR2,
background      IN BOOLEAN);
TBD
 
POPULATE_PENDING
Loads the DML pending queue with all base table rowids intended to be used after a create index ... NOPOPULATE ctx_ddl.populate_pending(
idx_name  IN VARCHAR2,
part_name IN VARCHAR2 DEFAULT NULL);
TBD
 
RECREATE_INDEX_ONLINE
Undocumented ctx_ddl.recreate_index_online(
idx_name         IN VARCHAR2,
parameter_string IN VARCHAR2 DEFAULT NULL,
parallel_degree  IN NUMBER   DEFAULT 1,
partition_name   IN VARCHAR2 DEFAULT NULL);
TBD
 
REMOVE_AUTO_OPTIMIZE
Undocumented ctx_ddl.remove_auto_optimize(
idx_name  IN VARCHAR2,
part_name IN VARCHAR2 DEFAULT NULL);
TBD
 
REMOVE_INDEX
Removes an index from a CTXCAT index preference ctx_ddl.remove_index(set_name IN VARCHAR2, column_list IN VARCHAR2);
TBD
 
REMOVE_MDATA
Removes MDATA values from a document

Overload 1
ctx_ddl.remove_mdata(
idx_name     IN VARCHAR2,
section_name IN VARCHAR2,
mdata_value  IN VARCHAR2,
mdata_rowid  IN ROWID,
part_name    IN VARCHAR2 DEFAULT NULL);
TBD
Overload 2 ctx_ddl.remove_mdata(
idx_name     IN VARCHAR2,
section_name IN VARCHAR2,
mdata_values IN sys.odcivarchar2list,
mdata_rowids IN sys.odciridlist,
part_name    IN VARCHAR2 DEFAULT NULL);
TBD
 
REMOVE_SDATA
Undocumented ctx_ddl.remove_sdata(
idx_name     IN VARCHAR2,
section_name IN VARCHAR2,
sdata_value  IN VARCHAR2,
sdata_rowid  IN ROWID,
part_name    IN VARCHAR2 DEFAULT NULL);
TBD
 
REMOVE_SECTION
May be used by CTXAPP and CTXADMIN to drop their own sections

Overload 1
ctx_ddl.remove_section(
group_name   IN VARCHAR2,
section_name IN VARCHAR2);
TBD
Overload 2 ctx_ddl.remove_section(
group_name IN VARCHAR2,
section_id IN NUMBER);
TBD
 
REMOVE_STOPCLASS
Deletes a stopclass from a stoplist ctx_ddl.remove_stopclass(stoplist_name IN VARCHAR2, stopclass IN VARCHAR2);
TBD
 
REMOVE_STOPTHEME
Deletes a stoptheme from a stoplist ctx_ddl.remove_stoptheme(stoplist_name IN VARCHAR2, stoptheme IN VARCHAR2);
TBD
 
REMOVE_STOPWORD
Removes a stopword from a stoplist ctx_ddl.remove_stopword(
stoplist_name IN VARCHAR2,
stopword      IN VARCHAR2,
language      IN VARCHAR2 DEFAULT NULL);
TBD
 
REMOVE_SUB_LEXER
Remove a sub lexer from a multi-lexer preference ctx_ddl.remove_sub_lexer(lexer_name IN VARCHAR2, language IN VARCHAR2);
TBD
 
REM_SEC_GRP_ATTR_VAL (new 12.1)
Remove a specific section group attribute value from the list of values
of an existing section group attribute
ctx_ddl.rem_sec_grp_attr_val(
group_name      IN VARCHAR2,
attribute_name  IN VARCHAR2,
attribute_value IN VARCHAR2);
TBD
 
REPLACE_INDEX_METADATA
Replaces metadata for local domain indexes ctx_ddl.replace_index_metadata(idx_name IN VARCHAR2, parameter_string IN VARCHAR2);
TBD
 
REPOPULATE_DOLLARN (new 12.1)
Repopulate $N as opposite of $K ctx_ddl.repopulate_dollarn(
idx_name  IN VARCHAR2,
part_name IN VARCHAR2 DEFAULT NULL);
TBD
 
SET_ATTRIBUTE
Sets an attribute preference ctx_ddl.set_attribute(
preference_name IN VARCHAR2,
attribute_name  IN VARCHAR2,
attribute_value IN VARCHAR2);
BEGIN
  ctx_ddl.set_attribute('_DATASTORE', 'PROCEDURE', 'XDB_DATASTORE_PROC');
  ctx_ddl.set_attribute('_DATASTORE', 'OUTPUT_TYPE', 'CLOB');
END;
/
 
SET_SECTION_ATTRIBUTE
Add a section specific attribute ctx_ddl.set_section_attribute(
group_name      IN VARCHAR2,
section_name    IN VARCHAR2,
attribute_name  IN VARCHAR2,
attribute_value IN VARCHAR2);
TBD
 
SET_SEC_GRP_ATTR (new 12.1)
Add a section group attribute (if it does not exist) and set its value.
raise error if the section group attribute already exists
ctx_ddl.set_sec_grp_attr(
group_name      IN VARCHAR2,
attribute_name  IN VARCHAR2,
attribute_value IN VARCHAR2);
PRAGMA SUPPLEMENTAL_LOG_DATA(set_sec_grp_attr, AUTO);
TBD
 
SPLIT_DOLLARI
Split the $I table ctx_ddl.split_dollari(
idx_name    IN VARCHAR2,
part_name   IN VARCHAR2,
mapping_tab IN VARCHAR2,  -- mapping table name
name_prefix IN VARCHAR2,  -- the prefix used for naming the output $I tables
tspace      IN VARCHAR2 DEFAULT NULL);
TBD
 
SPLIT_ZONE_TOKENS
Move contents of a zone section to one or more zone sections ctx_ddl.split_zone_tokens(
idx_name       IN VARCHAR2,
part_name      IN VARCHAR2 DEFAULT NULL,
source_section IN VARCHAR2,
split_map      IN split_tab);
TBD
 
SYNC_INDEX
Synchronize index ctx_ddl.sync_index(
idx_name        IN VARCHAR2 DEFAULT NULL,
memory          IN VARCHAR2 DEFAULT NULL,
part_name       IN VARCHAR2 DEFAULT NULL,
parallel_degree IN NUMBER   DEFAULT 1,
maxtime         IN NUMBER   DEFAULT NULL,
locking         IN NUMBER   DEFAULT LOCK_WAIT);
TBD
 
UNSET_ATTRIBUTE
Removes a set attribute from a preference ctx_ddl.unset_attribute(preference_name IN VARCHAR2, attribute_name IN VARCHAR2);
TBD
 
UNSET_SECTION_ATTRIBUTE
Unset an existing section attribute ctx_ddl.unset_section_attribute(
group_name     IN VARCHAR2,
section_name   IN VARCHAR2,
attribute_name IN VARCHAR2);
TBD
 
UNSET_SEC_GRP_ATTR (new 12.1)
Remove a section group attribute (and its list of values) ctx_ddl.unset_sec_grp_attr(
group_name     IN VARCHAR2,
attribute_name IN VARCHAR2);
PRAGMA SUPPLEMENTAL_LOG_DATA(unset_sec_grp_attr, AUTO);
TBD
 
UPDATE_MVDATA_SET
Update mvdata section values as a set at document level ctx_ddl.update_mvdata_set(
idx_name      IN VARCHAR2 DEFAULT NULL,
section_name  IN VARCHAR2 DEFAULT NULL,
mvdata_values IN sys.odcinumberlist,     -- mvdata values
mvdata_rowids IN sys.odciridlist,        -- rowids to be updated
part_name     IN VARCHAR2 DEFAULT NULL); -- partition name
TBD
 
UPDATE_POLICY
Updates a policy. Replaces the preferences of the policy. Arguments left NULL are not replaced. ctx_ddl.update_policy(
policy_name   IN VARCHAR2,
filter        IN VARCHAR2 DEFAULT NULL,
section_group IN VARCHAR2 DEFAULT NULL,
lexer         IN VARCHAR2 DEFAULT NULL,
stoplist      IN VARCHAR2 DEFAULT NULL,
wordlist      IN VARCHAR2 DEFAULT NULL);
TBD
 
UPDATE_SDATA
Update sdata section value ctx_ddl.update_sdata(
idx_name     IN VARCHAR2,
section_name IN VARCHAR2,
sdata_value  IN sys.anydata,
sdata_rowid  IN ROWID,
part_name    IN VARCHAR2 default NULL);
TBD
 
UPDATE_SUB_LEXER
Update a sub lexer in a multi-lexer preference ctx_ddl.update_sub_lexer(
lexer_name IN VARCHAR2,
language   IN VARCHAR2,
sub_lexer  IN VARCHAR2);
TBD
 
ZONE_TO_FIELD
Migrate from zone to field sections ctx_ddl.zone_to_field(
dx_name       IN VARCHAR2,
part_name     IN VARCHAR2 DEFAULT NULL,
lex_pref      IN VARCHAR2,
storage_pref  IN VARCHAR2,
attr_val_tab  IN VARCHAR2,
zone_sec_list IN sec_tab,
fld_sec_list  IN sec_tab);
TBD

Related Topics
Context
Packages

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2014 Daniel A. Morgan All Rights Reserved