我的Body
列是全文索引的,nvarchar(max)
Body
列
You want slighty mad this sat the 60th runing of the 3peaks race! Peny-ghent whernside and inglbauher! Only in yorkshire!
如果我运行:select body from messages where CONTAINS(Body,'you')
它不会返回任何数据。
如果我运行以下添加通配符select messageid,body from messages where CONTAINS(body,'"*you*"')
,它仍然不会返回数据。
你能帮我理解发生了什么吗?
由于
更新:如果you
或You
无效,无论如何都没有结果
答案 0 :(得分:0)
可能是区分大小写问题。尝试select messageid,body from messages where CONTAINS(body,'"*You*"')
,看看你是否得到了结果
答案 1 :(得分:0)
全文目录在“停止列表”中有一组单词,它不会搜索,因为SQL Server认为它们“对于搜索目的而言并不重要”
要做到这一点,你可以运行
select ssw.*
from sys.fulltext_system_stopwords ssw
where ssw.language_id = 1033;
下面是它不会搜索的字词,你会看到它包含“你”,因此它没有找到我的数据。