Oracle Context Option Administrator's Guide | ![]() Library |
![]() Product |
![]() Contents |
![]() Index |
Administration packages:
Text management packages:
Miscellaneous packages:
NAME | TYPE | DESCRIPTION |
CHANGE_MASK | Procedure | Modifies the personality mask for a ConText server |
GET_QUEUE_STATUS | Function | Returns the status of the specified queue |
RECOVER | Procedure | Cleans up database objects for deleted text tables |
SET_QUERY_BUFFER_SIZE | Procedure | Increases the size of the pipe used for queries |
SHUTDOWN | Procedure | Shuts down a single ConText server or all currently running ConText servers |
UPDATE_QUEUE_STATUS | Procedure | Updates the status of the specified queue |
CHANGE_MASK(NAME, PERSONALITY_MASK)
Argument | Datatype | Purpose |
NAME | VARCHAR2 | Specifies the name (internal ID) of the server for which you are changing the personality mask. |
PERSONALITY_ MASK | VARCHAR2 | Specifies the new personality mask that you want to assign to the server. Can be any combination of: R, Q, D, M, or L The default is QDM. |
execute ctx_adm.change_mask('DRSRV_8025', 'D')
A status of DISABLED indicates the queue or pipe is inactive and requests in the queue will not be processed by any of the available ConText servers. To enable the queue, you must call UPDATE_QUEUE_STATUS.
GET_QUEUE_STATUS(QNAME)
Argument | Datatype | Purpose |
QNAME | VARCHAR2 | Specifies the queue or pipe for which you want to return the status: TEXT_QUEUE (DDL and Query pipes) DML_QUEUE SERVICES_QUEUE |
ENABLED or DISABLED
declare status varchar2(8); begin status := ctx_adm.get_queue_status('DML_QUEUE'); end;
Note: ConText Servers automatically perform recovery approximately every fifteen minutes. CTX_ADM.RECOVER provides a method for users to manually perform recovery on command.
RECOVER
execute ctx_adm.recover
SET_QUERY_BUFFER_SIZE(BUFFER_SIZE)
Argument | Datatype | Purpose |
BUFFER_SIZE | NUMBER | Specifies the size, in bytes, of the query buffer. |
execute ctx_adm.set_query_buffer_size(100000);
SHUTDOWN(NAME, SDMODE)
Argument | Datatype | Purpose |
NAME | VARCHAR2 | Specifies the ID of the server to shutdown. |
SDMODE | NUMBER | Specifies the shutdown mode for the server: 0 Normal 1 Immediate 2 Abort The default is 0. |
execute ctx_adm.shutdown('DRSRV_3321', 1)
For example, the GET_QUEUE_STATUS returns a status of DISABLED for one of the queues. Once the error that caused the queue to become disabled is cleared, UPDATE_QUEUE_STATUS can be called with an action of ENABLE_QUEUE to reactivate the queue.
UPDATE_QUEUE_STATUS can also be used to control request processing in the system. When you disable a queue, you prevent any currently running ConText servers from picking up queued requests until you enable the queue.
UPDATE_QUEUE_STATUS(QNAME, QSTATUS)
Argument | Datatype | Purpose |
QNAME | VARCHAR2 | Specifies the queue or pipe for which you want to return the status: TEXT_QUEUE (DDL and Query pipes) DML_QUEUE SERVICES_QUEUE |
QSTATUS | VARCHAR2 | Specifies the action to perform on the queue: DISABLE_QUEUE ENABLE_QUEUE |
execute ctx_adm.update_queue_status('ctx_adm.dml_queue', 'ctx_adm.enable_queue')
Both QUEUE_NAME and ACTION must be fully qualified with the PL/SQL package name (CTX_ADM) as shown in the examples.
NAME | TYPE | DESCRIPTION |
CANCEL | Procedure | Removes a pending request from the Services Queue |
CANCEL_ALL | Procedure | Removes all pending requests from the Services Queue |
CANCEL_USER | Procedure | Removes a pending request from the Services Queue for the current user |
CLEAR_ALL_ERRORS | Procedure | Removes all requests with an error status from the Services Queue |
CLEAR_ERROR | Procedure | Removes a request with an error status from the Services Queue |
CLEAR_INDEX_ERRORS | Procedure | Removes errored indexing requests from the Services Queue |
CLEAR_LING_ERRORS | Procedure | Removes errored requests for Linguistic Services from the Services Queue |
REQUEST_STATUS | Function | Returns the status of a request in the Services Queue |
CANCEL(REQUEST_HANDLE)
Argument | Datatype | Purpose |
REQUEST_ HANDLE | NUMBER | Specifies the handle, returned by CTX_LING.SUBMIT, of the service request to remove. |
execute ctx_svc.cancel(214)
CANCEL_ALL
execute ctx_svc.cancel_all
CANCEL_USER
execute cancel
CLEAR_ALL_ERROR
execute ctx_svc.clear_all_errors
CLEAR_ERROR(REQUEST_HANDLE)
Argument | Datatype | Purpose |
REQUEST_ HANDLE | NUMBER | Specifies the handle, returned by CTX_LING.SUBMIT, of the errored service request to remove. |
execute clear_error(214)
CLEAR_INDEX_ERROR
execute ctx_svc.clear_index_errors
CLEAR_LING_ERROR
execute ctx_svc.clear_ling_errors
REQUEST_STATUS(REQUEST_HANDLE, TIMESTAMP, ERRORS)
Argument | Datatype | Purpose |
REQUEST_ HANDLE | NUMBER | Specifies the handle of the service request, as returned by CTX_LING.SUBMIT. |
TIMESTAMP | DATE | (OUT) Provides the time at which request was submitted. |
ERRORS | VARCHAR2 | (OUT) Provides the error message stack for the request; message stack is returned only if the status of the request is ERROR (see below). |
PENDING Request has not yet been picked up
RUNNING Request is being processed by a ConText server
ERROR Request encountered an error (see ERRORS argument)
SUCCESS Request completed successfully
declare status varchar2(10); begin status := ctx_svc.request_status(42); end;
NAME | TYPE | DESCRIPTION |
CLEAR_ATTRIBUTE | Procedure | Clears the buffer for any attributes that have been set |
CREATE_INDEX | Procedure | Creates an index for the text column using the specified policy |
CREATE_POLICY | Procedure | Creates a policy in the ConText data dictionary |
CREATE_PREFERENCE | Procedure | Creates a preference in the ConText data dictionary |
CREATE_SOURCE | Procedure | Creates a text loading source in the ConText data dictionary |
CREATE_TEMPLATE_POLICY | Procedure | Creates a policy that has no text column defined |
DROP_INDEX | Procedure | Deletes an index |
DROP_POLICY | Procedure | Deletes a policy from the ConText data dictionary |
DROP_PREFERENCE | Procedure | Deletes a preference from the ConText data dictionary |
DROP_SOURCE | Procedure | Deletes a text loading source from the ConText data dictionary |
OPTIMIZE_INDEX | Procedure | Combines index fragments into complete strings and updates index strings for deleted documents |
RESUME_FAILED_INDEX | Procedure | Resumes creation/optimization of a failed ConText index |
SET_ATTRIBUTE | Procedure | Specifies the Tile attribute and corresponding value for a preference |
UPDATE_POLICY | Procedure | Changes the description and/or the preferences in a policy |
UPDATE_SOURCE | Procedure | Changes the description and/or the preferences in a source |
CLEAR_ATTRIBUTES
execute ctx_ddl.clear_attributes
CREATE_INDEX(POLICY_NAME, PARALLEL)
Argument | Datatype | Purpose |
POLICY_NAME | VARCHAR2 | Specifies the name of the policy for which the index is created. |
PARALLEL | NUMBER | Specifies the number of ConText servers to be used in parallel to create the index for a column. The default is 1. |
execute ctx_ddl.create_index('MY_POLICY', 2)
CREATE_POLICY(POLICY_NAME, COLSPEC, SOURCE_POLICY, DESCRIPTION, TEXTKEY, LINENO, DSTORE_PREF, COMPRESSOR_PREF FILTER_PREF, LEXER_PREF, WORDLIST_PREF, STOPLIST_PREF, ENGINE_PREF)
Argument | Datatype | Purpose |
POLICY_NAME | VARCHAR2 | Specifies the name of the policy to be created. |
COLSPEC | VARCHAR2 | Specifies the column (and table) to which the policy is assigned. |
SOURCE_ POLICY | VARCHAR2 | Specifies the name of a policy on which the policy to be created is based. The default is DEFAULT_POLICY. |
DESCRIPTION | VARCHAR2 | Specifies the description of the policy. |
TEXTKEY | VARCHAR2 | Specifies the column or columns (up to sixteen) that represent the unique identifier (textkey) for each document. |
LINENO | VARCHAR2 | Specifies the column that stores the unique ID for each document section) in a master-detail table. |
DSTORE_PREF | VARCHAR2 | Specifies the name of the Data Store preference assigned to the policy. |
COMPRESSOR_ PREF | VARCHAR2 | Specifies the name of the Compressor preference assigned to the policy (Compressors are not currently provided or supported by ConText Option). |
FILTER_PREF | VARCHAR2 | Specifies the name of the Filter preference assigned to the policy. |
LEXER_PREF | VARCHAR2 | Specifies the name of the Lexer preference assigned to the policy. |
WORDLIST_ PREF | VARCHAR2 | Specifies the name of the Wordlist preference assigned to the policy. |
STOPLIST_ PREF | VARCHAR2 | Specifies the name of the Stoplist preference assigned to the policy. |
ENGINE_PREF | VARCHAR2 | Specifies the name of the Engine preference assigned to the policy. |
begin ctx_ddl.create_policy(policy_name => 'MY_POLICY', colspec => 'DOCS.TEXT', desrcription => 'This is my policy', textkey => 'AUTH,TITLE' dstore_pref => 'INTERNAL_STORE', filter_pref => 'ASCII_TXT', lexer_pref => 'ENGLISH_BASIC', wordlist_pref => 'CTXSYS.NO_SOUNDEX', stoplist_pref => 'MY_LIST' engine_pref => 'BASIC_INDEX',); end;
In this example, the textkey for the DOCS.TEXT is a composite textkey consisting of columns in DOCS named AUTH and TITLE.
For a composite textkey, each column name specified in TEXTKEY must be separated by a comma from the other column names. In addition, the string of column names is limited to 256 characters, including the comma,
If a preference belonging to another user is specified in a policy, the fully-qualified name of the preference must be used. For example, if you want to include the NO_SOUNDEX predefined preference in a policy, the syntax would be:
(..., wordlist_pref => CTXSYS.NO_SOUNDEX, ...)
The preference can then be used in a policy (indexing/linguistic generation) or a source (text loading).
CREATE_PREFERENCE(PREFERENCE_NAME, DESCRIPTION, OBJECT_NAME)
Argument | Datatype | Purpose |
PREFERENCE_ NAME | VARCHAR2 | Specifies the name of the preference to be created. |
DESCRIPTION | VARCHAR2 | Specifies the description for the preference. |
OBJECT_NAME | VARCHAR2 | Specifies the Tile for the preference. |
begin ctx_ddl.create_preference( 'NO_JOIN', 'Text engine that does not use any printjoins', 'GENERIC ENGINE'); end;
Once CREATE_PREFERENCE is called, the buffer used to store the attributes that were set for the preference is cleared. If the preference creation failed, all of the attributes must be entered again before calling CREATE_PREFERENCE.
CREATE_POLICY(NAME, COLSPEC, DESCRIPTION, REFRESH, ENGINE_PREF, TRANSLATOR_PREF, READER_PREF)
Argument | Datatype | Purpose |
NAME | VARCHAR2 | Specifies the name of the source to be created. |
COLSPEC | VARCHAR2 | Specifies the column (and table) to which the source is assigned. |
DESCRIPTION | VARCHAR2 | Specifies the description of the source. |
REFRESH | NUMBER | Specifies the elapsed time, in minutes, before a ConText server checks the specified directory for new files to be loaded. |
ENGINE_PREF | VARCHAR2 | Specifies the name of the Loader Engine preference assigned to the source. |
TRANSLATOR_ PREF | VARCHAR2 | Specifies the name of the Translator preference assigned to the policy. |
READER_PREF | VARCHAR2 | Specifies the name of the Reader preference assigned to the source. |
begin ctx_ddl.create_source(name => 'MY_SOURCE', colspec => 'DOCS.TEXT', desrcription => 'Source for loading', reader_pref => 'DOCS_DIRECTORY'); end;
In this example, the default Loader Engine and Translator preferences are used.
If a Loader Engine, Reader, or Translator preference belonging to another user is used to create a source, the fully-qualified name of the preference must be used.
The first time the source directory is scanned for files to load is SYSDATE (of source creation) + REFRESH. Subsequent scans occur at regular intervals specified by REFRESH.
The policy can be used as a template policy for other policies in the user's schema. If CTXSYS uses CREATE_TEMPLATE_POLICY to create a template policy, the policy is available to all ConText users.
CREATE_TEMPLATE_POLICY(POLICY_NAME, SOURCE_POLICY, DESCRIPTION, TEXTKEY, LINENO, DSTORE_PREF, COMPRESSOR_PREF FILTER_PREF, LEXER_PREF, WORDLIST_PREF, STOPLIST_PREF, ENGINE_PREF)
Argument | Datatype | Purpose |
POLICY_NAME | VARCHAR2 | Specifies the name of the template policy to be created. |
SOURCE_ POLICY | VARCHAR2 | Specifies the name of a policy on which the template policy to be created is based. The default is DEFAULT_POLICY. |
DESCRIPTION | VARCHAR2 | Specifies the description of the template policy. |
TEXTKEY | VARCHAR2 | Specifies the column in the table that stores the unique ID (textkey) for each document. |
LINENO | VARCHAR2 | Specifies the column that stores the unique ID for each document section) in a master-detail table. |
DSTORE_PREF | VARCHAR2 | Specifies the name of the Data Store preference assigned to the policy. |
COMPRESSOR_ PREF | VARCHAR2 | Specifies the name of the Compressor preference assigned to the policy (Compressors are not currently provided or supported by ConText Option). |
FILTER_PREF | VARCHAR2 | Specifies the name of the Filter preference assigned to the policy. |
LEXER_PREF | VARCHAR2 | Specifies the name of the Lexer preference assigned to the policy. |
WORDLIST_ PREF | VARCHAR2 | Specifies the name of the Wordlist preference assigned to the policy. |
STOPLIST_ PREF | VARCHAR2 | Specifies the name of the Stoplist preference assigned to the policy. |
ENGINE_PREF | VARCHAR2 | Specifies the name of the Engine preference assigned to the policy. |
DROP_INDEX(POLICY_NAME)
Argument | Datatype | Purpose |
POLICY_NAME | VARCHAR2 | Specifies the name of the policy for which the index is deleted. |
execute ctx_ddl.drop_index('MY_POLICY')
DROP_POLICY(POLICY_NAME)
Argument | Datatype | Purpose |
POLICY_NAME | VARCHAR2 | Specifies the name of the policy to be dropped. |
execute ctx_ddl.drop_policy('MY_POLICY')
DROP_PREFERENCE(PREFERENCE_NAME)
Argument | Datatype | Purpose |
PREFERENCE_ NAME | VARCHAR2 | Specifies the name of the preference to be dropped. |
execute ctx_ddl.drop_preference('MY_ENGINE')
DROP_SOURCE(SOURCE_NAME)
Argument | Datatype | Purpose |
SOURCE_NAME | VARCHAR2 | Specifies the name of the source to be dropped. |
execute ctx_ddl.drop_source('MY_LOADER')
OPTIMIZE_INDEX(POLICY_NAME, OPTTYP, THRESHOLD, PARALLEL, SWITCH_NEW, DROP_OLD)
Argument | Datatype | Purpose |
POLICY_NAME | VARCHAR2 | Specifies the name of the policy for the index to be optimized. |
OPTTYP | NUMBER | Specifies the type of optimization performed for the index: DR_OPTIMIZE_LAZY_ DELETES (use original index table to remove references for deleted/modified documents) DR_OPTIMIZE_ COMPACT_INDEXES (use original index table to compact index fragments) DR_OPTIMIZE_ COMPACT_NEW (use mirror index table to compact index fragments) DEFRAGMENT_TO_ NEW_TABLE (use mirror index table to compact index fragments and remove deleted/modified document references) DEFRAGMENT_ IN_PLACE (use original index table to compact index fragments and remove deleted document references) The default depends on the value set for the DEFAULT_OPTIMIZE attribute in the BASIC ENGINE Tile (see notes). |
THRESHOLD | NUMBER | Specifies the threshold, as a percentage, under which a term's index strings are not compacted during in-place compaction. The default is 50. |
PARALLEL | NUMBER | Specifies the number of ConText servers to be used in parallel to perform two-table optimization. The default is 1. |
SWITCH_NEW | BOOLEAN | For internal use only. |
DROP_OLD | BOOLEAN | For internal use only. |
begin ctx_ddl.optimize_index('MY_POLICY', opttyp => ctx_ddl.defragment_in_place, parallel => 2); end;
OPTTYP must be fully qualified with the PL/SQL package name (CTX_DDL) as shown in the examples.
The default for OPTTYP is the value specified for the DEFAULT_OPTIMIZE attribute (BASIC ENGINE Tile) in the Engine preference of the policy for the text column to be optimized. If no value was specified for DEFAULT_OPTIMIZE when the Engine preference for the policy was created, the default is DEFRAGMENT_TO_NEW_TABLE.
DEFRAGMENT_IN_PLACE does not use THRESHOLD. If OPTTYP is DEFRAGMENT_IN_PLACE, OPTIMIZE_INDEX ignores any value specified for THRESHOLD.
THRESHOLD is used only for in-place compaction. THRESHOLD specifies the percentage under which ConText Option compacts a term's index fragments (rows) if the compaction will result in the number of fragments for the term being reduced to more than or equal to the percentage specified.
For example, a THRESHOLD of 60 indicates the number of fragments for a given term must be be reduced to 60% or more of the total number of pre-optimization fragments for in-place compaction to take place.
Note: RESUME_FAILED_INDEX should be called only after the problem that caused the failure has been corrected or removed.
RESUME_FAILED_INDEX uses the ConText index log to determine the point of failure for the index and the point from which to proceed with indexing/optimization.
Depending on the stage at which the text DDL operation failed, RESUME_FAILED_INDEX may start the operation from the beginning, in which case, CREATE_INDEX or OPTIMIZE_INDEX serves the same purpose as RESUME_FAILED_INDEX and can be called in its place.
Because RESUME_FAILED_INDEX automatically determines where to resume a failed DDL operation, the user should consult the index log before calling RESUME_FAILED_INDEX to decide whether to call CREATE_INDEX/OPTIMIZE_INDEX instead.
RESUME_FAILED_INDEX(POLICY_NAME, OPERATION, PARALLEL, OPTTYP, SWITCH_NEW, DROP_OLD)
Argument | Datatype | Purpose |
POLICY_NAME | VARCHAR2 | Specifies the index (through the policy) that requires an Oracle index. |
OPERATION | NUMBER | Specifies the operation that was being performed on the index at the time of failure: 1 (creation) 2 (optimization) The default is 1. |
PARALLEL | NUMBER | If OPERATION is 1 (index creation), then this argument specifies the degree of parallelism used for creating the index. The default is 1. |
OPTTYP | NUMBER | If OPERATION is 2 (optimization), then this argument specifies the method of two-table optimization to use: DR_OPTIMIZE_ COMPACT_NEW (use mirror index table to compact index fragments) DEFRAGMENT_TO_ NEW_TABLE (use mirror index table to compact index fragments and remove deleted/modified document references) The default depends on the value set for the DEFAULT_OPTIMIZE attribute in the BASIC ENGINE Tile (see notes). |
SWITCH_NEW | BOOLEAN | For internal use only. |
DROP_OLD | BOOLEAN | For internal use only. |
begin ctx_ddl.resume_failed_index('MY_POLICY', operation => 2, parallel => 2, opttyp => ddl.defragment_to_new_table); end;
In this example, optimization (OPERATION => 2) is resumed with a parallelism level of 2 for the index for MY_POLICY. The type of optimization performed is compaction and garbage collection combined.
OPTTYP must be fully qualified with the PL/SQL package name (CTX_DDL) as shown in the examples.
The default for OPTTYP is the value specified for the DEFAULT_OPTIMIZE attribute (BASIC ENGINE Tile) in the Engine preference of the policy for the text column to be optimized. If no value was specified for DEFAULT_OPTIMIZE when the Engine preference for the policy was created, the default is DR_OPTIMIZE_COMPACT_NEW.
SET_ATTRIBUTE(NAME, VALUE, SEQ)
SET_ATTRIBUTE(NAME, VALUE1, VALUE2 SEQ)
Argument | Datatype | Purpose |
NAME | VARCHAR2 | Specifies the attribute to which a value is assigned. |
VALUE | VARCHAR2 | VALUE specifies the value assigned to the attribute. |
VALUE1 | VARCHAR2 | VALUE1 specifies the value assigned to the first attribute (used only for the EXECUTBLE attribute for the BLASTER Tile). |
VALUE2 | VARCHAR2 | Specifies the value assigned to the second attribute (used only for the EXECUTBLE attribute for the BLASTER Tile). |
SEQ | NUMBER | Specifies the sequence number assigned to the attribute (only required for creating preferences that use Tiles which support multiple values for the same attribute) The default is 1. |
execute ctx_ddl.set_attribute('INDEX_MEMORY', '3000000')
In the example above, the INDEX_MEMORY attribute is assigned approximately 3 megabytes of memory. The INDEX_MEMORY attribute belongs to the GENERIC ENGINE Tile and is used for allocating indexing memory.
Any errors that may occur from entering incorrect values for SET_ATTRIBUTE are not reported until CREATE_PREFERENCE is called.
When CREATE_PREFERENCE is called, the buffer used to store the attributes for the preference is cleared. If the preference creation failed, all of the attributes must be entered again before calling CREATE_PREFERENCE.
CTX_DDL.CLEAR_ATTRIBUTE can be used to manually clear all attributes in the buffer.
SEQ is only used with the Tiles that support multiple values for the same attribute (i.e. BLASTER FILTER and GENERIC STOP LIST). For all the other Tiles, SEQ is not required and should not be set.
A call to SET_ATTRIBUTE that uses the same SEQ value as a previous call to SET_ATTRIBUTE overrides the previously set attribute in the buffer..
UPDATE_POLICY(POLICY_NAME, DESCRIPTION, DSTORE_PREF, COMPRESSOR_PREF, FILTER_PREF, LEXER_PREF, WORDLIST_PREF, STOPLIST_PREF, ENGINE_PREF)
Argument | Datatype | Purpose |
POLICY_NAME | VARCHAR2 | Specifies the name of the policy to be updated. |
DESCRIPTION | VARCHAR2 | Specifies the new description of the policy. |
DSTORE_PREF | VARCHAR2 | Specifies the name of the new Data Store preference for the policy. |
COMPRESSOR_ PREF | VARCHAR2 | Specifies the name of the new Compressor preference (Compressors are not currently provided or supported by ConText Option). |
FILTER_PREF | VARCHAR2 | Specifies the name of the new Filter preference for the policy. |
LEXER_PREF | VARCHAR2 | Specifies the name of the new Lexer preference for the policy. |
WORDLIST_ PREF | VARCHAR2 | Specifies the name of the new Wordlist preference for the policy. |
STOPLIST_PREF | VARCHAR2 | Specifies the name of the new Stoplist preference for the policy. |
ENGINE_PREF | VARCHAR2 | Specifies the name of the new Engine preference for the policy. |
begin ctx_ddl.update_policy(policy_name => 'MY_POLICY', dstore_pref => 'CTX.MD_BINARY'); end;
UPDATE_SOURCE(NAME, COLSPEC, DESCRIPTION, REFRESH, NEXT, ENGINE_PREF, TRANSLATOR_PREF, READER_PREF)
Argument | Datatype | Purpose |
NAME | VARCHAR2 | Specifies the name of the source to be updated. |
COLSPEC | VARCHAR2 | Specifies the new text column referenced in the source. |
DESCRIPTION | VARCHAR2 | Specifies the new description of the source. |
REFRESH | NUMBER | Specifies the new refresh rate, in minutes, for the source. |
NEXT | DATE | Specifies a date and time for the initial scan of updated source by available Loader servers. |
ENGINE_PREF | VARCHAR2 | Specifies the name of the new text loading Engine preference for the source. |
TRANSLATOR_ PREF | VARCHAR2 | Specifies the name of the new text loading Translator perference for the source. |
READER_PREF | VARCHAR2 | Specifies the name of the new text loading Reader preference for the source. |
begin ctx_ddl.update_policy(policy_name => 'MY_POLICY', dstore_pref => 'CTX.MD_BINARY'); end;
NEXT specifies the date and time that an updated source is initially scanned by ConText servers running with the Loader (R) personality.
The next scan of the source occurs at NEXT + REFRESH, then all subsequent scans occur at regular intervals specified by REFRESH.
NAME | TYPE | DESCRIPTION |
REINDEX | Procedure | Specifies reindexing for a document |
SYNC | Procedure | Batches all pending requests in DML Queue and enables ConText servers with DDL personality to process the batches |
SYNC_QUERY | Function | Returns a time-stamp in the form of a date for the batches generated by SYNC |
REINDEX can be used to reindex documents that have errored during DDL or DML. It can also be used to provide DML processing on a view. Views cannot have a trigger assigned, meaning that DML operations on a view cannot be sent to the DML Queue by way of the trigger that is automatically created when a table is indexed.
Finally, it can be used to notify the system of updates to documents stored externally. If a document uses the OSFILE Data Store, REINDEX can be called when the document is updated to ensure that the update is recorded in the DML Queue.
REINDEX(POLICY, PK)
REINDEX(CID, PK)
Argument | Datatype | Purpose |
POLICY | VARCHAR2 | Specifies name of policy for text column where document to be reindexed is stored. |
CID | NUMBER | Specifies identifier for column where document to be reindexed is stored. |
PK | VARCHAR2 | Specifies ID for document to be reindexed. |
execute ctx_dml.reindex('MY_POLICY', '1')
execute ctx_dml.reindex(3451, '1')
REINDEX uses either the policy name or the column ID to identify the column where the document to be reindexed is stored.
A time stamp can be specified to limit the rows in the batch to those rows with a time stamp equal to or less than the time stamp specified. CID is used to limit SYNC to a particular text column. Otherwise, SYNC is performed for every text column in the database.
SYNC(TIMESTAMP, POL, PARALLEL)
Argument | Datatype | Purpose |
TIMESTAMP | DATE | Specifies the time at which you want the batch DML to start. The default is SYSDATE. |
POL | VARCHAR2 | Specifies the policy for the text column for which SYNC is performed. |
PARALLEL | NUMBER | Specifies the number of ConText servers used to process the operation. The default is 1. |
TESTING | NUMBER | For internal use only. |
TIMEOUT | NUMBER | For internal use only. |
execute ctx_dml.sync(PARALLEL=>2)
SYNC_QUERY(CID)
Argument | Datatype | Purpose |
CID | NUMBER | Specifies the text column for which SYNC_QUERY is called. |
CUR_DATE | DATE | Specifies the date from which to perform the query synchronization |
select ctx_dml.sync_query(3) from dual;
NAME | TYPE | DESCRIPTION |
CREATE_PHRASE | Function | Adds a phrase to the specified thesaurus or modifies the information about the phrase in the thesaurus |
CREATE_THESAURUS | Procedure | Creates the specified thesaurus |
DROP_THESAURUS | Procedure | Drops the specified thesaurus from the thesaurus tables |
Note: The remaining procedures and functions in CTX_THS are used to enable the thesaurus operators in query expressions.
For more information about the thesaurus operators, see Oracle ConText Option Application Developer's Guide.
CREATE_THESAURUS(TNAME, PHRASE, REL, RELNAME)
Argument | Datatype | Purpose |
TNAME | VARCHAR2 | Name of the thesaurus in which a new entry is added or an existing entry is updated. |
PHRASE | VARCHAR2 | The text of the entry to be added/modified. |
REL | VARCHAR2 | The text of the entry that is related to the new/modified entry. |
RELNAME | VARCHAR2 | The relationship between the two entries: SYN, BT, NT, BTG, NTG, BTP, NTP, RT, TT |
begin ctx_thes.create_phrase('my_thes','car', 'transportation,'BTN'); end;
CREATE_THESAURUS(NAME)
Argument | Datatype | Purpose |
NAME | VARCHAR2 | Specifies the name of the thesaurus to be created. |
execute ctx_ths.create_thesaurus('my_thes');
DROP_THESAURUS(NAME)
Argument | Datatype | Purpose |
NAME | VARCHAR2 | Specifies the name of the thesaurus to be dropped. |
execute ctx_ths.drop_thesaurus('my_thes');
NAME | TYPE | DESCRIPTION |
GET_INFO | Procedure | Returns the status and version number for the installed ConText Option |
GET_STATUS | Function | Returns the status of ConText Option |
GET_VERSION | Function | Returns the version number for the installed ConText Option |
GET_INFO(PRODUCT, VERSION, STATUS)
Argument | Datatype | Purpose |
PRODUCT | VARCHAR2 | Specifies the product for which information is returned. The only product for which information can be obtained is OCO (ConText Option) |
VERSION | VARCHAR2 | (OUT) Specifies the version of the product. |
STATUS | VARCHAR2 | (OUT) Specifies the status of the product. |
declare version varchar2(20); status varchar2(20); begin ctx_info.get_info(CTX_INFO.OCO, version, status); dbms_output.put_line ('OCO version is '||version||'); dbms_output.put_line ('OCO status is '||status||'); end;
GET_STATUS(PRODUCT)
Argument | Datatype | Purpose |
PRODUCT | VARCHAR2 | Specifies the product for which a status returned. The only product for which information can be obtained is OCO (ConText Option). |
declare status varchar2(60); begin status := ctx_info.get_status(CTX_INFO.OCO); dbms_output.put_line ('OCO status is '||status||'); end;
GET_VERSION(PRODUCT)
Argument | Datatype | Purpose |
PRODUCT | VARCHAR2 | Specifies the product for which a version number is returned. The only product for which information can be obtained is OCO (ConText Option). |
declare version number; begin version := ctx_info.get_version(CTX_INFO.OCO); dbms_output.put_line ('OCO version is '||version||'); end;
![]() ![]() Prev Next |
![]() Copyright © 1996 Oracle Corporation. All Rights Reserved. |
![]() Library |
![]() Product |
![]() Contents |
![]() Index |