请教下。我配置了全文检索.索引建立成功。
然后我用
select t.*, t.rowid from table t where contains(txt,'检索',1)>0 和
select t.*, t.rowid from table t where contains(txt,'test',1)>0
都能搜索出结果.
用
select t.*, t.rowid from table t where contains(txt,'%test%',1)>0
也能搜索出结果.
但是用
select t.*, t.rowid from table t where contains(txt,'%检索%',1)>0
就出错了.
ORA-29902:error in executing ODCIIndexStart() roitine
ORA-20000:Oracle Text error;
DRG-51030:wildcard query expansion resulted in too many terms.
我以为是搜索结果过多导致的错误. 于是增加条件
select t.*, t.rowid from table t where contains(txt,'%检索% and 结果',1)>0
这样的结果 肯定不会多的..但是还是出 刚才的错.
谁能帮我解决下问题.谢谢
然后我用
select t.*, t.rowid from table t where contains(txt,'检索',1)>0 和
select t.*, t.rowid from table t where contains(txt,'test',1)>0
都能搜索出结果.
用
select t.*, t.rowid from table t where contains(txt,'%test%',1)>0
也能搜索出结果.
但是用
select t.*, t.rowid from table t where contains(txt,'%检索%',1)>0
就出错了.
ORA-29902:error in executing ODCIIndexStart() roitine
ORA-20000:Oracle Text error;
DRG-51030:wildcard query expansion resulted in too many terms.
我以为是搜索结果过多导致的错误. 于是增加条件
select t.*, t.rowid from table t where contains(txt,'%检索% and 结果',1)>0
这样的结果 肯定不会多的..但是还是出 刚才的错.
谁能帮我解决下问题.谢谢
解决方案 »
- vs2010怎么连接到Oracle11g数据库
- 请教各位一个关于数据库表记录拆分的解决办法
- 求一个 oracle 字符函数
- pro*c为什么执行EXEC SQL WHENEVER NOT FOUND GOTO FAIL1;报错
- 用存储过程创建索引时,提示错误?请指教!
- 两台ORACLE数据互导
- 求一条Sql语句,余额操作
- 在oracal中这个包含子查询的语句耗时180秒,请问如何优化这个查询语句?
- Oracle安装问题!
- 提交到oracal数据库不正确(但是向access,sql server中提交完全正确)?
- 请问为什么我的物化视图日志中无记录?
- 分享:proc预处理c++程序standards.h出错解决方法
最后次出现是2个月前,很有可能今年不会出现了
用通配符就出错?
select count(*) from DCDB.T_NEWS_200606 where contains(news_content,'%中国%')>0
ORA-29902: error in executing ODCIIndexStart() routine
ORA-20000: Oracle Text error:
DRG-51030: wildcard query expansion resulted in too many terms
但查询内容不使用%%括起来,则查询没问题2全文索引的条件contains(全文索引字段,查询内容)中,查询内容使用与不使用%%括起来,查到的记录差别很大。
若使用查询内容使用%%括起来,与like查询时使用%%括起来的结果一般一样,但也可能一样。
若不使用查询内容使用%%括起来,则查到的记录差别很大
select count(*) from DCDB.T_NEWS_200606 where contains(news_title,'中国')>0; --找到19条记录
select count(*) from DCDB.T_NEWS_200606 where contains(news_title,'%中国%')>0; --找到1527条记录
select count(*) from DCDB.T_NEWS_200606 where news_title like '%中国%'; --找到1527条记录
select count(*) from DCDB.T_FORUM_TODAY where contains(Message_content, '%战争%')>0; --找到49条记录
select count(*) from DCDB.T_FORUM_TODAY where Message_content like '%战争%'; --找到51条记录
select count(*) from DCDB.T_FORUM_TODAY where contains(Message_content, '战争')>0; --找到0条记录