From user-return-23124-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Tue Dec 18 21:09:38 2012 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 EDC09D65E for ; Tue, 18 Dec 2012 21:09:37 +0000 (UTC) Received: (qmail 86923 invoked by uid 500); 18 Dec 2012 21:09:35 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 86786 invoked by uid 500); 18 Dec 2012 21:09:35 -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 86653 invoked by uid 99); 18 Dec 2012 21:09:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Dec 2012 21:09:34 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of paul.joseph.davis@gmail.com designates 209.85.216.48 as permitted sender) Received: from [209.85.216.48] (HELO mail-qa0-f48.google.com) (209.85.216.48) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Dec 2012 21:09:26 +0000 Received: by mail-qa0-f48.google.com with SMTP id l8so986819qaq.7 for ; Tue, 18 Dec 2012 13:09:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=r4/b19gmblING4hjVQhyyKZW4RGBZyZxNO+ZsblyjkA=; b=j+qkx5W130atpsNAcz1zNv0j11yAgtWmdGGry3Bj3bOJ40z2O3E2Ta6qA8j9On74Rk F5e+q+NbwP/WV1j+3WE7s/kFxC+bgiMs7ljqbJCOu10sf5Nj6uUpVx4HjZo68Ovy5BSD MTzw6UZ+EHloFEKRC9M8iBXilkgWwdPyzjls5/+EnNgxkHnWXGQpdObVO6+2AHSmKVw7 V8OqMVocKEyyvSjXHgQbx27yy2HwJDRDqVLsesSvzCMrkEigwksjbZ97AAwGuodsNCFA F6y5X3/NsFwZIE4JwN2TQ+iZ5LZv9AasLLsD8c31txHRDfs074Ke1eYQNlcLdbbllzYW DmDw== Received: by 10.229.106.21 with SMTP id v21mr338525qco.32.1355864946178; Tue, 18 Dec 2012 13:09:06 -0800 (PST) MIME-Version: 1.0 Received: by 10.49.47.112 with HTTP; Tue, 18 Dec 2012 13:08:26 -0800 (PST) In-Reply-To: References: From: Paul Davis Date: Tue, 18 Dec 2012 15:08:26 -0600 Message-ID: Subject: Re: How to find the change sequence of a document's revision To: "user@couchdb.apache.org" Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Bob, Ah, good point that I hadn't considered. I was only thinking about the case for leaves which would stick around, but this info definitely gets discarded for any revision that's not a leaf at compaction time. On Tue, Dec 18, 2012 at 3:07 PM, Robert Newson wrote: > It's worth remembering that previous revisions are removed during > compaction and are not replicated (i.e, this isn't a versioning > facility for users). > > > B. > > On 18 December 2012 21:02, Paul Davis wrote: >> While it won't appear in the changes feed, they do track the >> update_seq they originally had IIRC. I sure don't think we surface >> that anywhere. >> >> Ciprian, is there a specific need for this or is this for something >> app specific? >> >> On Tue, Dec 18, 2012 at 1:46 PM, Robert Newson wrote: >>> The previous revision doesn't have a sequence number and won't appear >>> in the changes feed. >>> >>> B. >>> >>> On 18 December 2012 19:02, Ciprian Dorin Craciun >>> wrote: >>>> Hello all! >>>> >>>> As noted in the subject I want to accomplish the following: having >>>> a particular document's revision I want to find out which is it's >>>> change sequence number. >>>> >>>> According to the documentation all I have to do is issue the >>>> following query to get the sequence number of the "latest" revision: >>>> http://.../database/document?revs_info=true&local_seq=true >>>> >>>> As such I've assumed that I can obtain that similarly even for >>>> previous revisions like this: >>>> http://.../database/document?rev=2-c33bbeaf4151d68d81f7e27f9cb0c03e&local_seq=true >>>> >>>> Unfortunately it doesn't work (as in it doesn't include any >>>> `_local_seq` attribute)... Any suggestions? >>>> >>>> (I know that I could find that information by scrolling through >>>> the `_changes` feed but that would be quite inefficient.) >>>> >>>> Thanks, >>>> Ciprian.