1、創建表空間,有必要將物理文件設置大一些
2、創建基于這個表空間的用戶
3、創建需要建立全文索引的表
4、用管理員帳戶為使用這用戶開發ctx_ddl權限
grant? execute on ctx_ddl to useer;
5、創建適合的lexer(解析器)
exec ctx_ddl.create_references('my_lexer','basic_lexer');
這里創建的basic_lexer解析器,將不支持utf-8的解析
6、為需要添加全文索引的列創建索引
create index myindex on tablename(column_name) indextype is ctxsys.context parameters('lexer my_lexer');
這里選擇context類型的索引,將不會自動同步,需要手動設置同步
7、設置同步
打開pl sql developer
右擊jobs,選擇新建
What值:
BEGIN
ctx_ddl.sync_index('myindex');
commit;
END;
間隔中寫:
SYSDATE + (1/24/24)
這表示間隔15分鐘同步一次