Freebase online query editor only returning 100 restaurants
I have a question about the Freebase online demo system available at https://www.freebase.com/query. When I entered a query that was supposed to return many answers, it returned only about 100 results. For example, the following MQL query which means "return all restaurants stored in Freebase" returns only 100 results:
[{ "mid": null, "name": null, "type": "/dining/restaurant", }]
Does anybody know whether Freebase limits the results it shows? Or, is it indeed a case that Freebase contains only about 100 restaurants?
The MQL API which powers that query editor tool limits the result set to 100 items by default. The are definitely more than 100 restaurants in Freebase.
You can increase the number of result returned like this:
[{
"mid": null,
"name": null,
"type": "/dining/restaurant",
"limit": 200
}]
However, as you increase the number of results returned you also increase the likelihood that a query will time-out. The best way to get many results is to write some code that uses cursors to page through the results as explained in the MQL developer documentation.
链接地址: http://www.djcxy.com/p/64424.html上一篇: 属性从freebase转储