具有偏移量和计数的新闻搜索API V5分页结果 [英] News Search API V5 paging results with offset and count

查看:87
本文介绍了具有偏移量和计数的新闻搜索API V5分页结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从此处的文档中: https://msdn.microsoft.com/en -us/library/dn760793.aspx

它说: totalEstimatedMatches: The estimated number of news articles that are relevant to the query. Use this number along with the count and offset query parameters to page the results.

It says: totalEstimatedMatches: The estimated number of news articles that are relevant to the query. Use this number along with the count and offset query parameters to page the results.

但是,存在一些严重的问题.

However, there are some serious issues.

1.返回的结果数始终小于"count"变量中的请求数.例如,将count设置为100只会得到75个结果.

1.The returned number of results is ALWAYS less than the requested number in the "count" variable. For example, setting a count=100 results in only 75 results.

2.更重要的是,即使跳过差异并向另一个带有偏移量的查询(在此示例中为offset = 100),API也会返回一个新的totalEstimatedMatches! (第一个查询为70k,第二次为138)

2.What's more, even skipping the difference and sending another query to the API with an offset (in this example, offset=100), the API returns a new totalEstimatedMatches!! (first query was 70k results, second time was 138)

这是怎么回事?我们如何完全获得第一个查询返回的totalEstimatedMatches?还是那个虚假的虚假数字?

What is going on here? How do we fully get the totalEstimatedMatches returned from the first query? Or is that a bogus inflated number?

推荐答案

我们对此问题进行了一些调查.基本上,搜索引擎索引不支持对总匹配的准确估算,在Bing.com上可以观察到相同的行为. 217M会导致上方图像选项卡中提供的屏幕截图也不是很准确.

We did some investigation on this issue. Basically, search engine index does not support an accurate estimation of total match, the same behavior could be observed on Bing.com. the 217M results in the screen shot provided in the image tab above which is not very accurate either.

而且,新闻具有后端机制,即任何查询输出均应小于100.因此,此示例中未正确使用估计的总匹配数.通常,我们不允许用户下载新闻中每个查询的太多结果.可以从某些查询中获得的文档数量实际上限制为一定数量,在大多数情况下大约为100.

And, news has backend mechanism that any query output should be less than 100. So the total estimated matches number is not used properly in this example. Normally we do not allow user to download too many results of each query in news. The number of documents you could get from certain query actually capped at a certain number, in most of the case it is around 100.

这篇关于具有偏移量和计数的新闻搜索API V5分页结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆