设为首页 加入收藏

TOP

Oracle全文检索方面的研究(全4)(二)
2014-11-24 08:12:01 来源: 作者: 【 】 浏览:1
Tags:Oracle 全文检索 面的 研究
y_sec2 (id number, docs varchar2(1000));

Insert into my_sec2 values (1, context.xml);

commit;

/

--定义xml_section_group

Begin

ctx_ddl.create_preference(test_file, file_datastore);

ctx_ddl.set_attribute(test_file, path, /opt/tmp);

ctx_ddl.create_section_group(test_html, html_section_group);

ctx_ddl.create_section_group(test_xml, xml_section_group);

End;

Create index ind_t_docs on my_sec2 (docs) indextype is ctxsys.context

parameters(datastore ctxsys.test_file filter ctxsys.null_filter section group

ctxsys.test_xml)

Begin

ctx_ddl.add_attr_section(test_xml, name, const@name);

End;

Select * from my_sec2 where contains (docs, complete within name) > 0;

3.4.5.Auto_section_group

Xml_section_group 的增强型,对于xml_section_group 用户需要自己添加需要定义的节组,

而使用auto_section_group,则oracle 会自动添加节组以及属性信息

3.4.6 Path_section_group

和auto_section_group 十分类似,path_section_group 比auto_section_group 增加了haspath 和

inpath 操作,但是path_section_group 不支持add_stop_section 属性

3.4.7 参考脚本

--建立null_section_group

Create index ind_m_sec on my_sec(docs) indextype is ctxsys.context

parameters (section group ctxsys.null_section_group);

--建立basic_section_group

Begin

Ctx_ddl.create_section_group(test_basic, basic_section_group);

End;

Begin

ctx_ddl.add_zone_section(test_basic, head, heading); --设定节查询

End;

Create index ind_my_sec1 on my_sec1(docs) indextype is ctxsys.context

parameters (section group test_basic);

--建立Html_section_group

begin

ctx_ddl.create_section_group(htmgroup, HTML_SECTION_GROUP);

end;

create index myindex on docs(htmlfile) indextype is ctxsys.context

parameters(filter ctxsys.null_filter section group htmgroup);

--建立Xml_section_group

Begin

ctx_ddl.create_section_group(test_xml, xml_section_group);

End;

Create index ind_t_docs on my_sec2 (docs) indextype is ctxsys.context

parameters(filter ctxsys.null_filter section group ctxsys.test_xml)

首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Oracle全文检索方面的研究(全1) 下一篇Oracle全文检索方面的研究(全6)

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·MySQL 基础入门视频 (2025-12-26 23:20:22)
·小白入门:MySQL超详 (2025-12-26 23:20:19)
·关于 MySQL 数据库学 (2025-12-26 23:20:16)
·SOLVED: Ubuntu 24.0 (2025-12-26 22:51:53)
·Linux 常用命令最全 (2025-12-26 22:51:50)