67,513
社区成员
发帖
与我相关
我的任务
分享
BEGIN
ctx_ddl.create_preference ('my_datastore_prefs', 'FILE_DATASTORE');
ctx_ddl.set_attribute ('my_datastore_prefs', 'path', 'd:\TEMP');
END;
begin
ctx_ddl.create_preference('cs_filter', 'CHARSET_FILTER');
ctx_ddl.set_attribute('cs_filter', 'charset', 'UTF8');
end;
BEGIN
ctx_ddl.create_preference ('my_lexer', 'chinese_lexer');
END;
BEGIN
ctx_ddl.create_preference ('my_chinese_lexer', 'CHINESE_VGRAM_LEXER');
END;
CREATE TABLE mydocs( id NUMBER PRIMARY KEY, title VARCHAR2(255), thefile
VARCHAR2(255) );
CREATE INDEX mydocs_text_index ON mydocs(thefile) INDEXTYPE IS ctxsys.context
PARAMETERS('datastore my_datastore_prefs filter cs_filter Lexer my_lexer');
SELECT id,title,thefile
FROM mydocs m
WHERE contains( thefile, '俄罗斯' ) > 0;