The database must first have the ctxsys user and ctxapp role
Database users assign ctxapp roles
Make sure that the LSNRCTL is running on the Oracle server. The plsextproc service is started.
Create Table tbl_1 (ID int primary key, title varchar2 (2000), cont BLOB );
Insert N records
Begin
Ctx_ddl.create_preference ('My _ lexer ', 'Chinese _ vgram_lexer ');
End;
Create index qidx_tbl_1_1 on tbl_1 (title) indextype is ctxsys. context parameters ('lexer my_lexer ')
Create index qidx_tbl_1_2 on tbl_1 (cont) indextype is ctxsys. context parameters ('lexer my_lexer ')
Search
Select * From tbl_1 where contains (title, 'search content')> 0;
Select * From tbl_1 where contains (cont, 'Find content')> 0;
Synchronization
Exec ctx_ddl.sync_index ('qidx _ tbl_1_1 ');
Exec ctx_ddl.sync_index ('qidx _ tbl_1_2 ');
Defects
We recommend that you do not use or to associate two full-text indexes. Otherwise, the efficiency is very low.
The search content can only match words manually created by the lexical analyzer.
For example, you can search for the title, but cannot find t.
Think about it too. Otherwise, the efficiency will not be too low. Haha