Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8EAD8DFC1 for ; Wed, 25 Jul 2012 22:38:30 +0000 (UTC) Received: (qmail 60583 invoked by uid 500); 25 Jul 2012 22:38:29 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 60546 invoked by uid 500); 25 Jul 2012 22:38:29 -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 60536 invoked by uid 99); 25 Jul 2012 22:38:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jul 2012 22:38:29 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of kxepal@gmail.com designates 209.85.215.180 as permitted sender) Received: from [209.85.215.180] (HELO mail-ey0-f180.google.com) (209.85.215.180) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jul 2012 22:38:21 +0000 Received: by eaa14 with SMTP id 14so54386eaa.11 for ; Wed, 25 Jul 2012 15:38:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=25FNzzpqCM7BY2JD425BBG8W+i0KfDXXx09tvoqjONE=; b=CM9WWNiujWR/2GvE/51aMVjznRW9u8/ejYKo8SQFa3G/uG3VB7PFDXaEu2nBAzKEEK F4TDiARDGGfZMVzldRkNjyw9T+8nTGO1GQZvmwiin4UzPEiMeqhLqFacNjtZX5KG8ScY RHq+Yg9veDfwnZ8xJeX8v8PA7Qx1rw7UPYa6JUMjjaTPJyjJApuJwwbvoyfbd3xFXohD CqZXGNaydhwt2h5CiS/NPoltRRXc7gQbLl/2w9jiqUT/YRkBQ5l6PTu5c5V6cD5/iZQk jAEHuvYq2ZP26TkJMM1o+xi1b4ZA6cctJH4ZQmu/HGJEe98/wRYXa4LtRcWkVVCAP9zu CVaw== MIME-Version: 1.0 Received: by 10.14.179.200 with SMTP id h48mr1654440eem.12.1343255881488; Wed, 25 Jul 2012 15:38:01 -0700 (PDT) Received: by 10.14.208.137 with HTTP; Wed, 25 Jul 2012 15:38:01 -0700 (PDT) In-Reply-To: References: Date: Thu, 26 Jul 2012 02:38:01 +0400 Message-ID: Subject: Re: accessing previous document revisions within a view From: Alexander Shorin To: user@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 Hi Tim, CouchDB documents revisions aren't for versioning things[1]. To access to previous document revision within view you need to store previous revisions inlined within document and emit them in map function. Note, that this solution promises that document size will rapidly grow over time - you'll need to limit stored inlined revisions somehow. [1] http://wiki.apache.org/couchdb/Document_revisions -- ,,,^..^,,, On Thu, Jul 26, 2012 at 2:29 AM, Tim Tisdall wrote: > Is it possible to access a previous revision of a document from within > a view? I'd like to output something in a view based on the > difference between the revisions of the documents. > > -Tim