[Developers] Random pick...
Kirrily Robert
kirrily at metaweb.com
Thu May 8 19:09:44 UTC 2008
I think it would be good if we could say "return" : "random" to get a
random item, like how you can do "return" : "count" for a count.
K.
On May 8, 2008, at 12:03 PM, Arthur van Hoff wrote:
> 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
>
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers
--
Kirrily Robert
Freebase Community Director
kirrily at metaweb.com
http://freebase.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freebase.com/pipermail/developers/attachments/20080508/8cfd2a0d/attachment.htm
More information about the Developers
mailing list