[Developers] Python query not working?
Christopher R. Maden
crism at metaweb.com
Tue Jul 22 15:11:06 UTC 2008
Chris Mahon wrote:
> Right gotcha, makes sense now :)
Cool.
> Out of interest, does the query on the link I provided limit the amount
> of results it will return or does it return everything?
The "limit":30 clause will limit the results to 30. You can eliminate
that clause, though for some queries you may run a risk of the query
timing out; you can add a cursor to page through the results 30 at a
time; or you can use the mqlreaditer() method instead of mqlread() to
iterate over the results of a large query.
(Actually, it looks like mqlread() automatically injects a cursor into
any list query, so my second suggestion there is irrelevant; however,
using mqlreaditer() is probably easier than turning the cursor’d query
around yourself.)
~Chris
--
Christopher R. Maden
Data Architect
Freebase.com: <URL: http://www.freebase.com/ >
Metaweb Technologes, Inc. <URL: http://www.metaweb.com/ >
More information about the Developers
mailing list