From user-return-3343-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Wed Feb 04 21:39:41 2009 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 73398 invoked from network); 4 Feb 2009 21:39:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Feb 2009 21:39:41 -0000 Received: (qmail 82607 invoked by uid 500); 4 Feb 2009 21:39:39 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 82575 invoked by uid 500); 4 Feb 2009 21:39:39 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 82564 invoked by uid 99); 4 Feb 2009 21:39:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Feb 2009 13:39:39 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [83.97.50.139] (HELO jan.prima.de) (83.97.50.139) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Feb 2009 21:39:30 +0000 Received: from [192.168.1.37] (e179079142.adsl.alicedsl.de [::ffff:85.179.79.142]) (AUTH: LOGIN jan, TLS: TLSv1/SSLv3,128bits,AES128-SHA) by jan.prima.de with esmtp; Wed, 04 Feb 2009 21:39:09 +0000 Message-Id: <00400F60-FE8E-4FFF-A843-84B558228D3A@apache.org> From: Jan Lehnardt To: user@couchdb.apache.org In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: _rev for random view??? Date: Wed, 4 Feb 2009 22:38:36 +0100 References: X-Mailer: Apple Mail (2.930.3) X-Virus-Checked: Checked by ClamAV on apache.org On 4 Feb 2009, at 21:18, Chris Anderson wrote: > On Wed, Feb 4, 2009 at 11:15 AM, Troy Kruthoff > 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 ;) >> > > I'm not sure how _rev works for randomness. couch_db.erl: Doc#doc{revs=[list_to_binary(integer_to_list(couch_util:rand32())) | Revs]} Cheers Jan --