手机版
你好,游客 登录 注册
背景:
阅读新闻

Oracle Text 全文索引 几种典型应用场景

[日期:2012-12-28] 来源:Linux社区  作者:renfengjun [字体:大 中 小]

3.初始化索引

CREATE INDEX idx_normal_content ONnormal_context(content) INDEXTYPE IS CTXSYS.CONTEXT ;

3.1. context类型的全文索引在基表数据更改的时候需要使用下面的命令同步全文索引

exec CTX_DDL.SYNC_INDEX('idx_normal_content') ;

4.查询

_dexter@FAKE> SELECT SCORE(1), id, contentFROM normal_context WHERE CONTAINS(content, 'classification', 1) > 0;
 
 SCORE(1)        ID CONTENT
---------- ------------------------------------------------------------------------------------------
      10          3  Use CTXRULEindex to
                                                        build a document
                                                      classification or routing
                                                      application. This index
                                                      is created on a table of
                                                      queries, where the
                                                      queries define the
                                                      classification or routing
                                                      criteria.
 
_dexter@FAKE> SELECT SCORE(1), id, contentFROM normal_context WHERE CONTAINS(content, 'small documents', 1) > 0;
 
 SCORE(1)        ID CONTENT
---------- ---------- --------------------------------------------------------------------------------
        5          2 Use this index typefor
                                                    better mixed query
                                                    performance. Typically,
                                                    with this index type,
                                                    you index small
                                                    documents or text
                                                      fragments. Other
                                                    columns in the base
                                                    table, such as item
                                                    names, prices, and
                                                    descriptions can be
                                                    included in the index to
                                                    improve mixed query
                                                      performance.
                                                    This index type is
                                                    transactional,
                                                    automatically updating
                                                    itself after DML to base
                                                    table. No CTX_
                                                    DDL.SYNC_INDEXis
                                                      necessary.

linux
相关资讯       Oracle索引  Oracle Text 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款