News Search API V5 paging results with offset and count

試著忘記壹切 提交于 2019-12-24 02:03:26

问题


From the documentation here: https://msdn.microsoft.com/en-us/library/dn760793.aspx

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.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.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)

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


回答1:


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.

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.



来源:https://stackoverflow.com/questions/39752665/news-search-api-v5-paging-results-with-offset-and-count

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!