From user-return-13451-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Tue Nov 02 18:46:12 2010 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 91148 invoked from network); 2 Nov 2010 18:46:11 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Nov 2010 18:46:11 -0000 Received: (qmail 20641 invoked by uid 500); 2 Nov 2010 18:46:41 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 20572 invoked by uid 500); 2 Nov 2010 18:46:41 -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 20564 invoked by uid 99); 2 Nov 2010 18:46:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Nov 2010 18:46:41 +0000 X-ASF-Spam-Status: No, hits=2.9 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.161.52] (HELO mail-fx0-f52.google.com) (209.85.161.52) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Nov 2010 18:46:35 +0000 Received: by fxm12 with SMTP id 12so6052374fxm.11 for ; Tue, 02 Nov 2010 11:46:14 -0700 (PDT) Received: by 10.223.96.204 with SMTP id i12mr6106139fan.145.1288723574446; Tue, 02 Nov 2010 11:46:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.83.140 with HTTP; Tue, 2 Nov 2010 11:45:54 -0700 (PDT) X-Originating-IP: [2.80.144.108] In-Reply-To: References: <7F47D1F3-9D05-4C7A-896D-8EA41D6B10F7@apache.org> From: Marco Monteiro Date: Tue, 2 Nov 2010 18:45:54 +0000 Message-ID: Subject: Re: Questions about changes feed To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=20cf30433ef6de5be90494165662 X-Virus-Checked: Checked by ClamAV on apache.org --20cf30433ef6de5be90494165662 Content-Type: text/plain; charset=ISO-8859-1 When you want to delete the document, save it with the additional property "_deleted" with the value true. This deletes the document but keeps the properties that the document has, which can then be used in the filter. Marco On 26 October 2010 04:38, kowsik wrote: > On Mon, Oct 25, 2010 at 7:57 AM, Adam Kocoloski > wrote: > > On Oct 24, 2010, at 10:10 PM, kowsik wrote: > > > >> I have a few questions about the _changes feed. > >> > >> 1. How many changes are kept around for each DB? Obviously, not > >> everything, but is it the last 100, 1000 or some other configurable > >> limit? > > > > The most recent edit of each branch of every document is kept around > forever, or until a new edit on that branch occurs. > > Thanks Adam. A follow up observation (enhancement request really): I > like the way the filter code gets the document so it can use the > req.query to only push certain notification to certain clients. > Unfortunately when a document gets deleted all I get is something like > this: > > > {"seq":389,"id":"8f8bb53dbf8eb9be81923fea21072386","changes":[{"rev":"2-30b513fc78ad7eadd4db4b7f87591338"}],"deleted":true} > > It would be nice to have the actual doc be part of this so that the > filter can be more intelligent in its routing decision. For example, > only notify certain interested clients about the deletion. > > Thanks, > > K. > --- > http://www.pcapr.net > http://twitter.com/pcapr > http://labs.mudynamics.com > --20cf30433ef6de5be90494165662--