Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 75917 invoked from network); 28 May 2010 17:13:05 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 28 May 2010 17:13:05 -0000 Received: (qmail 85090 invoked by uid 500); 28 May 2010 17:13:04 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 85054 invoked by uid 500); 28 May 2010 17:13:04 -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 85046 invoked by uid 99); 28 May 2010 17:13:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 May 2010 17:13:04 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jchris@gmail.com designates 74.125.83.180 as permitted sender) Received: from [74.125.83.180] (HELO mail-pv0-f180.google.com) (74.125.83.180) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 May 2010 17:12:55 +0000 Received: by pvg7 with SMTP id 7so147046pvg.11 for ; Fri, 28 May 2010 10:12:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:content-type:mime-version :subject:from:in-reply-to:date:content-transfer-encoding:message-id :references:to:x-mailer; bh=XLz36qsoDOvFdbATUhTTnSyd/oVeqYnKnKlyO+8NZnw=; b=htpEL9Y0hjSLJJJKnlU3I1n2m7T1beId/eBxvhAd0O6PpFbCBVMYHKVXxaDdN3xXS1 9cdWoWIKXqiRpykOk8vvPnEcj9Xt7ZAIvXL/wJ2sZRgnm4PXG86Xs47x1h/1xQRIb5CO tznYze6EBV2B92YYip+h2qsjrReUjN+4M0lI8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=UXZtnn9JMe1r+gkD2VQEMJWJk+EwWvl7SQKvhPU9lj2eWjmPTGHBoXICqZm6YRnlBB S+hYy5rSC//hhiEQCMFr5s4n7guVY6FUUNlnBCPF2jhLK1za1lZ6OByq667Gdlv8nLKr 84DPdchr+XAfhL/plR/Ia3VbTEGcs0xdZdlbo= Received: by 10.141.106.9 with SMTP id i9mr460372rvm.181.1275066754334; Fri, 28 May 2010 10:12:34 -0700 (PDT) Received: from [192.168.1.101] (c-98-248-172-14.hsd1.ca.comcast.net [98.248.172.14]) by mx.google.com with ESMTPS id i19sm2226642rvn.11.2010.05.28.10.12.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 28 May 2010 10:12:32 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1078) Subject: Re: _changes/Filter detecting new documents From: J Chris Anderson In-Reply-To: Date: Fri, 28 May 2010 10:12:29 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <403C50D9-B2BB-4183-A04D-06B66418B5E6@gmail.com> References: To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1078) X-Virus-Checked: Checked by ClamAV on apache.org On May 28, 2010, at 8:54 AM, Zachary Zolton wrote: > I was just thinking on this problem the other day.... >=20 > The only thing I can think of is looking at the _rev of the document. > Unfortunately, the format of the _rev has changed in the past, and it > may change in the future. So I think we're supposed to treat it as an > opaque token. >=20 > Hmm... Hopefully someone else has a better solution. >=20 I've started to write code that depends on the fact that the rev is = structured like "3-abcdefabcedef" (eg I've got some code that splits by = "-", etc). So you could look for docs with a rev that starts with 1. I'm not sure = how good an idea it is to do that... > --Zach >=20 > On Fri, May 28, 2010 at 4:33 AM, Pavan Kumar = wrote: >> Hi , >>=20 >> using _changes API with filters, can i detect if the document is a = newly >> Created one or Modified one ? What i understand now is that for both = of the >> scenarios ( new documents added or existing document changed ) = _changes API >> will give a reply back. >>=20 >> Is there a way to differentiate ? >>=20 >> Thanks, >> Pavan >>=20