例如﹐現在有電腦A﹐B。B電腦裝有oracle,A電腦上我建了一個FTP站點來存放上傳的文件﹐現在我在B電腦oracle上運行:
create table t_location
(
   id number,
   textv varchar2(100)
)insert into t_location values(1,'世界唯一的七星_酒店.doc')insert into t_location values(2,'Oracle學習要點.txt')insert into t_location values(3,'mytest.txt')insert into t_location values(4,'ftp://172.24.9.131/myftp/test1.txt')BEGIN
ctx_ddl.CREATE_PREFERENCE ('l_ftp', 'CHINESE_VGRAM_LEXER');
CTX_DDL.CREATE_PREFERENCE('t_ftp','URL_DATASTORE');
ctx_ddl.set_attribute('t_ftp','timeout','300');
END;create index ftp_index on t_location(textv) 
indextype is CTXSYS.CONTEXT parameters('DATASTORE t_ftp lexer l_ftp filter ctxsys.inso_filter');select * from t_location where contains(textv,'about(aaaa)')>0update t_location set textv='ftp://172.24.9.131/myftp/mytest.txt' where id=3alter index file_index rebuild online parameters('sync')alter index file_index rebuild online parameters('optimize full maxtime unlimited')我運行這些代碼后可以找到FTP里的文件﹐當我修改FTP里某個文件后﹐我同步索引
然后最運行select代碼﹐什么也找不到﹐只能從新建索引......如何解決修改或新增文件時可以同步索引后繼續查詢﹐不用最從新建索引....