couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <paul.joseph.da...@gmail.com>
Subject Re: _rev for random view???
Date Wed, 04 Feb 2009 19:21:35 GMT
On Wed, Feb 4, 2009 at 2:15 PM, Troy Kruthoff <tkruthoff@blit.com> wrote:
>
> Anyone have thoughts on the best way to create a view of random documents?
>  I'm thinking a view with emit(doc._rev,null) would be sufficient for my
> needs, but thought I'd ping the list for collective knowledge ;)
>
> -- troy
>
>
>

You might try using a _list and then emit views randomly. Though
you'll want to check out the math on how to guarantee that you're not
biasing towards the beginning of your list.

HTH,
Paul Davis

Mime
View raw message