Sql Server 全文目录可以找到以下内容吗?
我的字段中有以下数据,该字段由全文目录
索引。
帕莫拉马市,洛杉矶, 美国加利福尼亚州
简单。 (我还有很多其他的,但它们工作得很好)。
现在,如果用户提供了这个不正确的拼写错误搜索词
pamorma city <-- 注意中间的“a” 第 6 个字符槽缺失
,则不会返回此数据字段。
那么,目录上的 Sql 2008 FTS 可以返回它认为接近的单词吗?
这是 sql,顺便说一句,如果这有帮助的话......
SELECT TOP(10) a.Address, AddressSearch.RANK AS TopRank
FROM Addresses a WITH (NOLOCK)
INNER JOIN CONTAINSTABLE (Addresses, FormattedAddress,
'panorma NEAR city') AS AddressSearch
ON a.IdAddress = AddressSearch.[KEY]
如果是这样......你也可以为 ' 定义一个权重吗?近'字也? 比如 90% 匹配之类的? 干杯:)
i have the following data in a field, which is being indexed by a Full Text Catalog
.
Pamorama City, Los Angeles,
California, United States
Simple. (I also have lots of others, but they are working fine).
Now, if the user provides this incorrect, mispelt search word
pamorma city <-- notice the middle 'a'
is missing from the 6th character slot
then this data field isn't being returned.
So, can a Sql 2008 FTS on a catalog return words which it THINKS it's close?
this is the sql, btw, if this helps...
SELECT TOP(10) a.Address, AddressSearch.RANK AS TopRank
FROM Addresses a WITH (NOLOCK)
INNER JOIN CONTAINSTABLE (Addresses, FormattedAddress,
'panorma NEAR city') AS AddressSearch
ON a.IdAddress = AddressSearch.[KEY]
If so .. can u also define a weight for 'close' words also? like a 90% match or something?
cheers :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许您可以使用 T-SQL 函数 SOUNDEX 和 差异?
Maybe you can use the T-SQL functions SOUNDEX and DIFFERENCE?