CREATE_EXTRACT_POLICY
The CREATE_EXTRACT_POLICY procedure creates an extraction policy to use. This policy can only be used by the policy owner.
Syntax
CTX_ENTITY.CREATE_EXTRACT_POLICY(
policy_name IN VARCHAR2,
lexer IN VARCHAR2 DEFAULT NULL,
include_supplied_rules IN BOOLEAN DEFAULT TRUE,
include_supplied_dictionary IN BOOLEAN DEFAULT TRUE
);
policy_name
Specify the name of the new extraction policy.
lexer
Specify the name of the lexer preference. Only AUTO_LEXER is supported. If not specified, CTXSYS.DEFAULT_EXTRACT_LEXER will be used. The attributes index_stems and deriv_stems are not allowed.
include_supplied_rules
Specify whether Oracle-supplied rules are included in entity extraction. If false, automatic acronym resolution will be turned off. The default is true.
include_supplied_dictionary
Specify whether the Oracle-supplied dictionary is included in entity extraction. The default is true.
Examples
The following example creates an extraction policy using the default settings. By default, the Oracle-supplied features, such as rules and dictionary, are enabled.
exec CTX_ENTITY.CREATE_EXTRACT_POLICY('pol1');
The following example creates an extraction policy that explicitly specifies certain parameters. It specifies the lexer to be used as mylex, which must be an AUTO_LEXER preference. It also includes the Oracle-supplied rules, but disables the Oracle-supplied dictionary.
exec CTX_ENTITY.CREATE_EXTRACT_POLICY('pol2', 'mylex', TRUE, FALSE);