-->

News Search API V5 paging results with offset and

2019-07-12 12:48发布

问题:

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.