如何增加自由碱API结果限制 [英] how to increase freebase API result limit

查看:129
本文介绍了如何增加自由碱API结果限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找不到游离碱的关于它的文档什么,但似乎他们限制的结果数量为100。例如:

I can't find anything in freebase's docs about it but it seems they limit the number of results to 100. For example:

[{
  "type":"/base/popstra/celebrity",
  "name":null
}]

返回100个结果,而

[{
  "type":"/base/popstra/celebrity",
  return:"count"
}]

说,有6244的结果。有谁知道如何让他们的休息吗?我知道我可以像全国部分参数限制查询,然后汇总结果,但我想preFER东西少哈克。

Says there are 6244 results. Does anyone know how to get the rest of them? I know I can limit the queries by some parameter like country and then aggregate the results but I'd prefer something less hacky.

推荐答案

您可以使用限制属性要求更多的结果。然而,获取大量的可以给你查询超时。

You can use the limit property to request more results. However, fetching large numbers can give you a query timeout.

一个更可靠的方法是使用光标属性。通过在光标 的值为true 。你会得到一批结果,但你也得到光标在响应一个新值。重复查询,但替补在新的光标价值,以获得下一批成果。通过这种方式,你可以获取甚至一个非常大的数据集。

A more reliable way is to use the cursor property. Pass in a cursor value of true. You'll get a batch of results, but you'll also get a new value for cursor in the response. Repeat your query, but substitute in the new cursor value to get the next batch of results. In this way you can fetch even a very large set of data.

更多信息:<一href=\"http://www.freebase.com/docs/mql/ch04.html#envelopeparameters\">http://www.freebase.com/docs/mql/ch04.html#envelopeparameters

这篇关于如何增加自由碱API结果限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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