SQL 自由文本等
如果我使用像 '%fish%' 这样的内容,则返回
AQUARIAN GOLDFISH FLAKES
但如果我使用 Contains([Description],' "fish*" ' ) ,那么我可以做些什么吗?
基本上我想返回任何地方含有“鱼”一词的任何东西。
If I use like '%fish%' the following is returned
AQUARIAN GOLDFISH FLAKES
but if I use Contains([Description],' "fish*" ' ) it isn't is there something I can do?
Basically I want to return anything that has the word fish in it anywhere.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
怎么样
或者
这会给你带来什么吗?
SQL Server 全文索引不支持搜索带有前导通配符的表达式,例如,您不能使用
CONTAINS([Description], '"*fish*"')
或类似的内容:-(什么 同义词 - 您应该能够仅搜索“fish”并找到“goldfish”。
您还可以为全文搜索定义自己的同义词,例如将“goldfish”定义为“fish”的 href="http://www.simple-talk.com/sql/learn-sql-server/understanding-full-text-indexing-in-sql-server/" rel="nofollow noreferrer">了解全文索引在 SQL Server 中 - 关于修改全文同义词库的文章中有一个很好的部分
。
What about
or
Does that give you anything?
SQL Server Fulltext indexing does not support searching for an expression with a leading wildcard, e.g. you cannot go a
CONTAINS([Description], '"*fish*"')
or something like that :-(What you could also do is define your own synonym for fulltext search, e.g. define "goldfish" to be a synonym for "fish" - than you should be able to search for just "fish" and also find "goldfish".
Check out Understanding Full-Text Indexing in SQL Server - there's a good section a bit down in the article on modifying the fulltext thesaurus.
Marc