Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Chinese_VgRam_Lexer can't create index file correctly!
RDBMS Version: Oracle 8.1.7
Operating System and Version: Windows 2000 Profesional
Error Number (if applicable):
Product (i.e. SQL*Loader, Import, etc.): Oracle 8.1.7
Product Version: Oracle 8.1.7
Chinese_VgRam_Lexer can't create index file correctly!
Entironment: Oracle 8.1.7, GB(ZHS16GBK)CharacterSet,Index Field(BLOB)
Process:
1.Login in by CtxSys:
GRANT "CTXAPP" TO "HRPUSER";
ALTER USER "HRPUSER" DEFAULT ROLE ALL;
GRANT EXECUTE ON "CTXSYS"."CTX_ADM" TO "HRPUSER"; GRANT EXECUTE ON "CTXSYS"."CTX_CATSEARCH" TO "HRPUSER"; GRANT EXECUTE ON "CTXSYS"."CTX_CONTAINS" TO "HRPUSER"; GRANT EXECUTE ON "CTXSYS"."CTX_DDL" TO "HRPUSER"; GRANT EXECUTE ON "CTXSYS"."CTX_DOC" TO "HRPUSER"; GRANT EXECUTE ON "CTXSYS"."CTX_QUERY" TO "HRPUSER";
2.Login by Hrpuser
begin
ctx_ddl.create_preference('mylex','BASIC_LEXER'); ctx_ddl.set_attribute('mylex','printjoins','_-'); ctx_ddl.create_preference('mywordlist', 'BASIC_WORDLIST'); ctx_ddl.set_attribute('mywordlist','PREFIX_INDEX','TRUE'); ctx_ddl.set_attribute('mywordlist','PREFIX_MIN_LENGTH',1); ctx_ddl.set_attribute('mywordlist','PREFIX_MAX_LENGTH', 5); ctx_ddl.set_attribute('mywordlist','SUBSTRING_INDEX', 'YES'); ctx_ddl.create_preference('cnlex','CHINESE_VGRAM_LEXER');end;
3.Create Index:
create index syszfbodyindex on syszfbodylist(bodytext)
indextype is ctxsys.context
parameters ('DATASTORE CTXSYS.DIRECT_DATASTORE FILTER
CTXSYS.INSO_FILTER LEXER HRPUSER.CNLEX WORDLIST HRPUSER.MYWORDLIST');
Above,successful.
4.Seach:
select num from syszfbodylist where contains(bodytext,'TEST',1)>0
order by num; (TEST is a Chinese Word)
No result,Then I excute:"Select Token_Text from
DR$SYSZFBODYINDEX$I",but the display of the field is unrecognized
codes. Why??
Can you help me? Thanks.
Received on Mon Dec 15 2003 - 01:25:33 CST