【发布时间】:2021-02-04 09:02:33
【问题描述】:
我想在 Oracle 中进行模糊搜索,但查询不适用于空格。
例如。假设我们有一个表 po_test_tmp 有很多记录
如果我们执行这个查询,它就可以正常工作
select score(1), ae.po_number
from po_test_tmp ae
where CONTAINS(po_number, 'fuzzy(po, 50,5000, weight)', 1)> 0
order by score(1) desc;
但是,如果我们尝试搜索 PO 123 之类的词,则它不起作用
select score(1), ae.po_number
from po_test_tmp ae
where CONTAINS(po_number, 'fuzzy(PO 123, 50,5000, weight)', 1)> 0
order by score(1) desc;
ORA-29902: error in executing ODCIIndexStart() routine
ORA-20000: Oracle Text error:
DRG-50901: text query parser syntax error on line 1, column 10
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.
如果搜索词有空格,如何进行模糊搜索,搜索词可以有特殊字符和多个空格。
【问题讨论】:
标签: oracle oracle11g oracle-sqldeveloper fuzzy-search fuzzy-logic