FREETEXTTABLE 为什么或如何给出比其他人更高的排名值

发布于 2024-07-07 23:43:19 字数 223 浏览 9 评论 0原文

有一个存储过程在两个表上使用 FREETEXTTABLE 两次,然后合并结果并返回前 50 个。

问题是,如果我搜索“Women of Brewster”,结果将返回“Confession of an ex doofus motha” A表中排名第143位,B表中排名第二的“布鲁斯特广场女性”排名第102位。

这是因为计数的原因吗? (表A返回结果总计为2399。表B返回结果总计为3445。)

There is a store procedure that uses FREETEXTTABLE twice on two tables and then merges the results and returns the top 50.

The problem is if I do a search on "Women of Brewster", the results returns "Confession of an ex doofus motha" with a rank of 143 from table A and second "Women of Brewster Place" with a rank of 102 from table B.

Is this because of the count? (Table A return results total is 2399. Table B return results total is 3445.)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

我是有多爱你 2024-07-14 23:43:19

简短的回答:

自由文本排名基于 OKAPI
BM25排名公式。 中的每个术语
查询已排名,值为
总结。 自由文本查询将添加
通过屈折变化查询的单词
生成(词干形式
原始查询条件); 这些词是
被视为单独的条款,没有
特殊权重或关系
他们原来的词
生成的。 生成的同义词
同义词库功能被视为
单独的、同等权重的术语。

当然,可以在微软的网站上找到更长、更复杂的答案。 对于高等数学,单击此处

The short answer:

Freetext ranking is based on the OKAPI
BM25 ranking formula. Each term in the
query is ranked, and the values are
summed. Freetext queries will add
words to the query via inflectional
generation (stemmed forms of the
original query terms); these words are
treated as separate terms with no
special weighting or relationship with
the words from which they were
generated. Synonyms generated from the
Thesaurus feature are treated as
separate, equally weighted terms.

The much longer, and far more complicated answer can be found on Microsoft's site, of course. For advanced mathematics, click here.

习惯成性 2024-07-14 23:43:19

1) 噪声文件仅限于几个字符,这意味着“of”一词现在被认为很重要。

2) 两个表的结果(计数)确实很重要,因为较小的表很可能会被赋予更好的权重值。 这将使较小表中的排名变得更高。

Josef 的 MSDN 链接很好地说明了它如何计算排名值。

1) The noise file was limited to a few characters, meaning that the word "of" is now consider important.

2) The two tables results (count) do matter, since the smaller table will most likely be given a better weight value. This will skew the rank to be higher in a smaller table.

Josef's link to MSDN was great at figuring out how it computes the rank value.

小忆控 2024-07-14 23:43:19
USE AdventureWorks2012;  
GO  
  
SELECT FT_TBL.Description  
    ,KEY_TBL.RANK  
FROM Production.ProductDescription AS FT_TBL   
    INNER JOIN FREETEXTTABLE(Production.ProductDescription,  
    Description,   
    'high level of performance') AS KEY_TBL  
ON FT_TBL.ProductDescriptionID = KEY_TBL.[KEY]  
ORDER BY RANK DESC;  
GO  

使用此 INNER JOIN 方法可以按排序顺序获取相关结果。
参考: Azure SQL FREETEXABLE

USE AdventureWorks2012;  
GO  
  
SELECT FT_TBL.Description  
    ,KEY_TBL.RANK  
FROM Production.ProductDescription AS FT_TBL   
    INNER JOIN FREETEXTTABLE(Production.ProductDescription,  
    Description,   
    'high level of performance') AS KEY_TBL  
ON FT_TBL.ProductDescriptionID = KEY_TBL.[KEY]  
ORDER BY RANK DESC;  
GO  

Use this INNER JOIN approach to get the relevant results in sorted order.
Reference: Azure SQL FREETEXABLE

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文