In the case of user and role CTXAPP case CTXSYS
exec ctx_ddl.create_preference ('my_lexer','chinese_vgram_lexer');
oracle text analyzer in three kinds:
(1) basic_lexer: can only be split according to spaces and punctuation.
(2) chinese_vgram_lexer: Chinese specialized analyzers, split by the word units. The advantage of this approach is that all will be able to save all possible phrases into the index table, so that the data will not be missed.
(3) chinese_lexer: A new Chinese analyzer can recognize the most commonly used Chinese words, according to common words split storage.
Each analyzer has its most suitable application environment, this should be selected according to encoding and data storage situation of their own database.
Create an index:
create index SYS_USER_INDEX on SYS_USER (USERNAME) indextype is CTXSYS.CONTEXT parameters ( 'lexer my_lexer'); // can not be updated automatically exec ctx_ddl.sync_index ( 'SYS_USER_INDEX'); // manual update create index SYS_USER_INDEX on SYS_USER(USERNAME) indextype is CTXSYS.CONTEXT parameters ('lexer my_lexer sync (on commit)'); //自动更新