全文检索

SQL> select file_path from url_search where contains(file_path,'中中')>0;
我的应用和数据库有以下的特点
1.我的Doc文档是通过Delphi的OLEContainer加进去的,所以不是单纯的Doc文档而是加了个OLE的头
2.我的数据库的字符集是16GBK
问题是这样解决的
通过查看ctxsys.ctx_parameters发现其中的default_filter_file和default_filter_binary都是inso_filter,所以要修改
execute ctxsys.ctx_adm('default_filter_file','null_filter');
execute ctxsys.ctx_adm('default_filter_binary','null_filter');
选择语言解析器
execute ctxsys.ctx_ddl.create_preference('mylexer','chinese_vgram_lexer');
创建索引
create index myindex on testtable(column2) indextype is ctxsys.context parameters('lexer mylexer Filter ctxsys.inso_filter'');

--注意选择合适的lexer和inso_filter。

这样就可以了

 

 

==================

全文检索的问题

当我用下面的语句建立一个全文检索的索引时
=================================================
create index test_fulltext on testfulltext(bb)
indextype is ctxsys.context;
================================================

出了这个错误:
===============================================
ERROR 位于第 1 行:
ORA-29855: 执行 ODCIINDEXCREATE 例行程序时出错
ORA-20000: interMedia Text 错误:
DRG-11422: 语言初始化失败
DRG-00100: internal error, arguments : [52100],[drxs.c],[553],[gxtopen],[1]
DRG-11208: 未设置 ORACLE_HOME
ORA-06512: 在"CTXSYS.DRUE", line 126
ORA-06512: 在"CTXSYS.TEXTINDEXMETHODS", line 78
ORA-06512: 在line 1
=======================================================
解决方法:init.ora中的text_enable注释

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

甲骨文

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值