I. Log in to Oracle using SYS user
(1) Run-cmd-sqlplus-sys/password @ Connect character as Sysdba
Ii. Delegation of authority
1, Grant Ctxapp to full-text search user use;
2. Grant execute on Ctx_dll to full-text retrieval using the user;
3. Full-Text search using User login Oracle can log on through the PL/SQL interface, and the following operations are done in the PL/SQL interface.
Iii. Creating an analyzer
BEGIN
--Set the lexical parser name: ' Oratext_lexer ', type: ' Chinese_vgram_lexer '
Ctx_ddl.create_preference (' oratext_lexer ', ' chinese_vgram_lexer ');
END;
Iv. Creating Table Indexes
CREATE index name on table name ( field ) Indextype is ctxsys.context parameters (' lexer oratext_lexer ' ); --Parser name
Commit
The above is the index is completed, you can test the error: SELECT * from Ctx_user_index_errors
You can use the statement query: SELECT * FROM Table A where contains (a.name, ' yield ') > 0 order by A.name;
Five, index optimization (for data changes: Add, delete, modify)
BEGIN
Index synchronization:
Ctx_ddl.sync_index (' Idx_querydatacol ');
Index optimization:
Ctx_ddl.optimize_index (' Idx_querydatacol ', ' full ');
END;
Six, cut words to divide the phrase to reorganize