[Developers] How do you ask MQL to get a count of the number of available results?

John Giannandrea jg at metaweb.com
Tue Jan 8 19:47:38 UTC 2008


Chris Eppstein wrote:
> Will that return the number returned or the total that exist when
> using a limit query?

if you include a limit, it will return anything up to that number, for  
example:

   "query" : {
     "limit" : 50000,
     "return" : "count",
     "type" : "/film/film"
   }

If there is no limit, limit:0 is assumed.

For public types, sometimes the instance count is too large to  
enumerate quickly and there is a type hint for these which is updated  
daily.

   "query" : {
     "/freebase/type_profile/instance_count" : null,
     "id" : "/people/person"
   }

-jg



More information about the Developers mailing list