WORLD_LEXER
A simple lexer that can index documents in any language or mixed languages. Works with short strings and long documents. Does not support stemming or other lexer-related attributes.
Use the WORLD_LEXER to index text columns that contain documents of different languages. For example, use this lexer to index a text column that stores English, Japanese, and German documents.
WORLD_LEXER differs from MULTI_LEXER in that WORLD_LEXER automatically detects the language(s) of a document. Unlike MULTI_LEXER, WORLD_LEXER does not require you to have a language column in your base table nor to specify the language column when you create the index. Moreover, it is not necessary to use sub-lexers, as with MULTI_LEXER. (See “MULTI_LEXER”.)
WORLD_LEXER supports all database character sets, and for languages whose character sets are Unicode-based, it supports the Unicode 5.0 standard. For a list of languages that WORLD_LEXER can work with, see “World Lexer Features”.
The WORLD_LEXER has the following attributes:
Table 36 WORLD_LEXER Attributes
| Attribute | Attribute Value |
|---|---|
mixed_case |
Enables mixed-case (upper- and lower-case) searches of text (for example, cat and Cat). Allowable values are YES and NO (default). |
printjoins |
Specify the non alphanumeric characters that, when they appear anywhere in a word (beginning, middle, or end), are processed as alphanumeric and included with the token in the Text index. This includes printjoins that occur consecutively. See Basic Lexer ““printjoins””. |
skipjoins |
Specify the non-alphanumeric characters that, when they appear within a word, identify the word as a single token; however, the characters are not stored with the token in the Text index. See Basic Lexer ““skipjoins””. |
Rules for PRINTJOIN and SKIPJOIN Characters
Refer to “Rules for PRINTJOIN and SKIPJOIN Characters” in JAPANESE_VGRAM_LEXER.
WORLD_LEXER Example
The following is an example of creating an index using WORLD_LEXER.
exec ctx_ddl.create_preference('MYLEXER', 'world_lexer');
create index doc_idx on doc(data)
indextype is CONTEXT
parameters ('lexer MYLEXER
stoplist CTXSYS.EMPTY_STOPLIST');