【发布时间】:2020-07-04 16:30:00
【问题描述】:
我正在尝试在表中搜索“未放置”之类的短语,其中 col 由“indextype is ctxsys.context”索引
select * from
table
where contains (col, 'not placed')>0
没有“NOT”字样,搜索工作绝对正常,没有任何问题。
只要在搜索短语中添加“not”,就会引发以下问题 -
ORA-29902: error in executing ODCIIndexStart() routine
ORA-20000: Oracle Text error:
DRG-50901: text query parser syntax error on line 1, column 1
29902. 00000 - "error in executing ODCIIndexStart() routine"
*Cause: The execution of ODCIIndexStart routine caused an error.
*Action: Examine the error messages produced by the indextype code and
take appropriate action.
我什至尝试对“not”字使用转义序列,但它无法识别“not”字本身
【问题讨论】:
-
where instr(col, 'not placed') > 0说什么? -
尝试使用
{}将搜索字符串包装成contains (col, '{not placed}')>0 -
@Littlefoot 这不能使用,因为 col 大小很大,我们需要一个索引来处理它
-
@Tejash 这是给出“放置”的记录的结果并否定“不”的存在
标签: sql oracle oracle12c text-search