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 EF90ED63E for ; Tue, 18 Dec 2012 21:07:15 +0000 (UTC) Received: (qmail 73272 invoked by uid 500); 18 Dec 2012 21:07:14 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 73235 invoked by uid 500); 18 Dec 2012 21:07:14 -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 73212 invoked by uid 99); 18 Dec 2012 21:07:13 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Dec 2012 21:07:13 +0000 Received: from localhost (HELO mail-vb0-f49.google.com) (127.0.0.1) (smtp-auth username rnewson, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Dec 2012 21:07:13 +0000 Received: by mail-vb0-f49.google.com with SMTP id r6so1470496vbi.36 for ; Tue, 18 Dec 2012 13:07:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.52.29.175 with SMTP id l15mr4736603vdh.2.1355864832120; Tue, 18 Dec 2012 13:07:12 -0800 (PST) Received: by 10.52.68.209 with HTTP; Tue, 18 Dec 2012 13:07:11 -0800 (PST) In-Reply-To: References: Date: Tue, 18 Dec 2012 21:07:11 +0000 Message-ID: Subject: Re: How to find the change sequence of a document's revision From: Robert Newson To: "user@couchdb.apache.org" Content-Type: text/plain; charset=ISO-8859-1 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.