Google 喜欢在 SQL Server 中使用全文搜索进行搜索查询
我正在运行一个小网站,我想在其中添加类似“相关链接”部分的功能。
为此,我创建了全文目录和索引。
到目前为止,我尝试了很多方法来创建行为类似于 google 的搜索查询,但我想说我与 google 正在做的事情还没有 10% 接近。在我的研究过程中,我发现只有以下查询才能提取良好的记录。
Select col1, col2
from MyTable
Where
FREETEXT(col1, 'User Passed Search Text')
有没有人有好的方法来创建全文搜索查询,这可以帮助获得给定文本的更好的相关记录?
谢谢
I am running a small website wherein I would like to make a functionality like Related Links section.
For that I created fulltext catalog and index.
So far I tried many ways to create search query which behaves like google, but I would say i was not even 10% close to what google is doing. During my research what i found was only following query was pulling good records.
Select col1, col2
from MyTable
Where
FREETEXT(col1, 'User Passed Search Text')
Has anyone has good way to create a FullText Search Query which can help in getting better related records for given text?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 where 条件中将 * 代替 col1 它将在完整的表中搜索并给出结果检查链接
http://sqlmag.com/sql-server/sample-full-text -搜索引擎
in where condition put * in place of col1 it will search in complete table and gives you result check the link
http://sqlmag.com/sql-server/sample-full-text-search-engine