【发布时间】:2016-02-07 09:13:47
【问题描述】:
我在 SQL 2012 中有一个表,我正在对它执行全文搜索。
作为较大字符串的一部分,其中一条记录包含文本“试用您的系统”。
问题是,如果我在目标字符串中搜索两个靠得太近的单词,我找不到匹配项。
select * from mytable where contains(*,'trying') -- match
select * from mytable where contains(*,'trying and out') -- no match
select * from mytable where contains(*,'trying and your') -- no match
select * from mytable where contains(*,'trying and system') -- match
我知道我可以通过将搜索模式用双引号括起来来搜索确切的字符串,但这并不是我真正想要的。
有什么建议可以让以上所有搜索词都匹配吗?
谢谢。
【问题讨论】:
标签: sql-server full-text-search