Oracle全文检索方面的研究(全1)(3)
Pentax camera 200
Canon camera 250
Olympus camera 300
Nikon camera 400
Insert into auction values(5, aigo camera, 1, 10, 27-oct-2002);
Insert into auction values(6, len camera, 1, 23, 27-oct-2002);
commit;
/
--测试索引是否自动同步
Select title, price from auction where catsearch(title, camera,
price <= 100)>0;
Title price
--------------- ----------
aigo camera 10
len camera 23
添加多个子查询到索引集:
begin
ctx_ddl.drop_index_set(auction_iset);
ctx_ddl.create_index_set(auction_iset);
ctx_ddl.add_index(auction_iset,price); /* sub-index A */
ctx_ddl.add_index(auction_iset,price, bid_close); /* sub-index B */
end;
drop index auction_titlex;
Create index auction_titlex on auction(title) indextype is ctxsys.ctxcat
parameters (index set auction_iset);
SELECT * FROM auction WHERE CATSEARCH(title, camera,price = 200 order by bid_close)>0;
SELECT * FROM auction WHERE CATSEARCH(title, camera,order by price, bid_close)>0;
任何的Dml 操作后,Ctxcat 的索引会自动进行同步,不需要手工去执行,与ctxcat 索引相对应的查询操作符是catsearch.
语法:
Catsearch(
[schema.]column,
Text_query varchar2,
相关新闻>>
- 发表评论
-
- 最新评论 更多>>