Oracle Text Multi-Language Lexers
879028Sep 28 2011 — edited Sep 29 2011Hi everyone,
I want to create a multi-language index in a blob column.
Normally I create the one preference for each language then i just add them with the ctx_ddl.add_sub_lexer, like this:
---ENGLISH LEXER
EXECUTE ctx_ddl.create_preference('english_lexer','basic_lexer');
EXECUTE ctx_ddl.set_attribute('english_lexer', 'theme_language','english');
(...)
EXECUTE ctx_ddl.create_preference('global_lexer','multi_lexer');
EXECUTE ctx_ddl.add_sub_lexer('global_lexer','default','english_lexer');
(...)
Now i'm having a problem creating a portuguese lexer: by executing the following
EXECUTE ctx_ddl.create_preference('portuguese_lexer','basic_lexer');
EXECUTE ctx_ddl.set_attribute('portuguese_lexer','theme_language','portuguese'); -- 'por' language code in ISO 639-2
I'm getting this error:
Error starting at line 18 in command:
EXECUTE ctx_ddl.set_attribute('portuguese_lexer','theme_language','portuguese')
Error report:
ORA-20000: Oracle Text error:
DRG-10705: invalid value portuguese for attribute THEME_LANGUAGE
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.CTX_DDL", line 56
ORA-06512: at line 1
20000. 00000 - "%s"
*Cause: The stored procedure 'raise_application_error'
was called which causes this error to be generated.
*Action: Correct the problem as described in the error message or contact
the application administrator or DBA for more information.
Trying to add the theme_language with the ISO 639-2 language code results in the same error.
Thanks in advance