QUERY_PROCEDURE
This callback stored procedure is called by Oracle Text as needed to tokenize words in the query. A space-delimited group of characters (excluding the query operators) in the query will be identified by Oracle Text as a word.
Requirements
This procedure can be a PL/SQL stored procedure.
The index owner must have EXECUTE privilege on this stored procedure.
This stored procedure must not be replaced or be dropped after the index is created. You can replace or drop this stored procedure after the index is dropped.
Restrictions
This procedure must not perform any of the following operations:
-
Rollback
-
Explicitly or implicitly commit the current transaction
-
Enter any other transaction control statement
-
Alter the session language or territory
The child elements of the root element tokens of the XML document returned must be in the same order as the tokens occur in the query word being tokenized.
The behavior of this stored procedure must be deterministic with respect to all parameters.
Parameters
Table 2-32 describes the interface for the user-defined lexer query procedure:
Table 32 User-defined Lexer Query Procedure XML Schema Attributes
| Parameter Position | Parameter Mode | Parameter Datatype | Description |
|---|---|---|---|
| 1 | IN |
VARCHAR2 |
Query word to be tokenized. |
| 2 | IN |
CTX_ULEXER.WILDCARD_TAB |
Character offsets of wildcard characters (% and _) in the query word. If the query word passed in by Oracle Text does not contain any wildcard characters then this index-by table will be empty. The wildcard characters in the query word must be preserved in the tokens returned in order for the wildcard query feature to work properly. The character offset is 0 (zero) based. Offset information follows USC-2 codepoint semantics. |
| 3 | IN OUT |
VARCHAR2 |
Tokens encoded as XML. If the query word contains no tokens then either NULL must be returned or the tokens element in the XML document returned must contain no child elements. The length of the data must be less-than or equal to 32512 bytes. |