因此,根据The oracle documentation on catsearch,无法将左截断的搜索与catsearch文本查询一起使用。 但是,我发现使用双通配符确实具有左截断查询的预期效果。
例如select * from foo where CATSEARCH(bar, '**zing', '')>0;
会找到带有bar的记录,其值为“ this is amazing”,而
select * from foo where CATSEARCH(bar, '*zing', '')>0;
不会
为配置单词列表,我启用了 substring_index 和 prefix_index 。在substring_index描述中,它确实提到了左截断(和双截断)通配符的用法。
我找不到任何原因来说明为何/如何使用双通配符,如何进行优化以及它是否还有其他副作用。
所以最终的问题是