ADD_STOPCLASS
Adds a stopclass to a stoplist. A stopclass is a class of tokens that is not to be indexed. A stoplist cannot have more than 250 stopclasses with stoppatterns. This does not include the NUMBERS stopclass. When indexing with Stop Patterns, the recommended memory setting is at least 500 MB to 1 GB to optimize the performance of indexing.
English is the only language supported for stopclasses.
Syntax
CTX_DDL.ADD_STOPCLASS(
stoplist_name IN VARCHAR2,
stopclass IN VARCHAR2,
stoppattern IN VARCHAR2 default NULL
);
stoplist_name
Specify the name of the stoplist.
stopclass
Specify the stopclass to be added to stoplist_name. It can be either the NUMBERS stopclass or else it is considered as the pattern stopclass.
NUMBERS includes tokens that follow the number pattern: digits, numgroup, and numjoin only. Therefore, 123ABC is not a number, nor is A123. These are labeled as MIXED. $123 is not a number (this token is not common in a text index because non-alphanumerics become whitespace by default). In the United States, 123.45 is a number, but 123.456.789 is not; in Europe, where numgroup may be ‘.’, the reverse is true.
If NUMBERS is not specified for the stopclass parameter, then it is treated as a pattern stopclass, and you can provide any name to the stopclass parameter. If you specify stopclass as a pattern class, then you need to specify the pattern in the stoppattern parameter. The pattern includes any string pattern that may contain numbers and dates as well.
The maximum number of stopwords, stopthemes, and stopclasses you can add to a stoplist is 4095.
stoppattern
Specify the stop pattern to add to the stoplist. If the stopclass is specified as a pattern class, then the stop pattern must be specified. You can use the Oracle Regular Expression to specify the stop pattern.
Call the ADD_STOPCLASS procedure multiple times to add multiple stop patterns to a stoplist. You must specify different stopclass names for adding multiple stop patterns to a stoplist.
A stop pattern is not case-sensitive by default, but acts as case-sensitive when the MIXED_CASE lexer preference is enabled. The stop pattern can have the maximum length of 512 characters. When indexing with Stop Patterns, the recommended memory setting is at least 500 MB to 1 GB to optimize the performance of indexing.
See Also: Oracle Database Development Guide for more information about the syntax of the Oracle Regular Expression.
Example
The following example adds a stopclass of NUMBERS to the stoplist mystoplist:
begin
ctx_ddl.add_stopclass('mystoplist', 'NUMBERS');
end;
The following example adds the pattern stopclass of SSN to the stoplist mystoplist:
begin
ctx_ddl.add_stopclass('mystoplist', 'SSN', '\d{3}-\d{2}-\d{4}');
end;
In this example, the stopclass SSN matches all the tokens of the form <3 digit number>-<2 digit number>-<4 digit number>, example, 234-11-8902.