[Developers] Random pick...
Arthur van Hoff
AVH at zing.net
Thu May 8 19:03:16 UTC 2008
I tried using the timestamp method that JG suggested, but unfortunately
the topics are not distributed evenly over the time span. I ended up
reading the entire list and one picking at random.
In a separate discussion I have suggested to JG that there should be a
way to do this with cursors. I would like to be able to find out from a
cursor the current position and total number of results that the result
set may produce. Also, I want a way to seek the cursor to a given
position in a result set. This would be handy in general, for example
for paging through a result set, but it would also allow me to pick a
random position and seek to it.
From: developers-bounces at freebase.com
[mailto:developers-bounces at freebase.com] On Behalf Of Kendra Kuhl
Sent: Thursday, May 08, 2008 11:02 AM
To: 'For discussions about MQL,Freebase API and apps built on Freebase'
Subject: Re: [Developers] Random pick...
Does somebody have a query like this handy?
Thanks,
Kendra
From: developers-bounces at freebase.com
[mailto:developers-bounces at freebase.com] On Behalf Of John Giannandrea
Sent: Tuesday, April 29, 2008 2:11 PM
To: For discussions about MQL, Freebase API and apps built on Freebase
Subject: Re: [Developers] Random pick...
Arthur van Hoff wrote:
I need to randomly pick a few topics of a specific type out of
Freebase.
Any suggestions on how to do this without first requesting the
entire list?
We dont currently have a good way to do this.
One option would be read the first and last timestamped instances of a
type and then run rand over the range and pick limit:1 at some random
timestamp ranges.
-jg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freebase.com/pipermail/developers/attachments/20080508/47842e63/attachment-0001.htm
More information about the Developers
mailing list