FREETEXT 搜索 - 根据匹配程度对结果进行排序
我正在尝试实现全文搜索。我正在使用 FREETEXT 并且得到了正确的结果。问题在于结果的排序。如果尝试搜索“停车场”,则匹配这两个词的结果应该位于开头,然后是仅匹配其中一个词的结果。我怎样才能做到这一点?
感谢
I'm trying to implement a Full Text Search. I'm using FREETEXT and I get the correct results. The problem is the ordering of results. If try to search for "car park" the results that match both those words should be at the beginning and then those matching only one of them. How can I accomplish this?
Thank
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 FREETEXTTABLE 而不是 FREETEXT。
FREETEXTTABLE 将返回包含排名信息的键表。您可以对此排名信息进行排序,以查找最接近匹配的项目。
Microsoft FREETEXTTABLE 文档
以下示例显示了其工作原理:
Use FREETEXTTABLE instead of FREETEXT.
FREETEXTTABLE will return a table of keys with Rank information. You can sort on this Rank information to find the items that are the closest matches.
Microsoft FREETEXTTABLE documentation
The following example shows how this works: