SQL Server语言 - 全文搜索:如何按相关性排序



我正在使用全文搜索,在我的网站上,用户通常按几个单词、作者姓名(1-2 个单词)和标题(1-3 个单词)进行搜索......

我需要像相关性搜索这样的东西,并且已经尝试将 containstable 与 Rank 一起使用,但结果非常糟糕。

此外,我尝试将ISABOUT与所有可能的组合一起使用,并具有适当的权重 - 结果还可以,但速度很差。在 4 个单词和大约 30K 行内搜索需要 10-20 秒。

我的查询是:

ISABOUT (madonna weight(0.1),messina weight(0.1),"madonna and messina" weight(0.2),virgin weight(0.1),"madonna and virgin" weight(0.2),"messina and virgin" weight(0.2),"madonna and messina and virgin" weight(0.3),child weight(0.1),"madonna and child" weight(0.2),"messina and child" weight(0.2),"madonna and messina and child" weight(0.3),"virgin and child" weight(0.2),"madonna and virgin and child" weight(0.3),"messina and virgin and child" weight(0.3),"madonna and messina and virgin and child" weight(0.4))

有什么想法吗?

以下简化的查询工作正常:

ISABOUT (madonna weight(0.1),messina weight(0.1),virgin weight(0.1),child weight(0.1))

突出组合是很好的意图,但这个也相当不错

相关内容

  • 没有找到相关文章

最新更新