From user-return-22334-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Wed Oct 3 14:52:02 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 830F9D39E for ; Wed, 3 Oct 2012 14:52:02 +0000 (UTC) Received: (qmail 28920 invoked by uid 500); 3 Oct 2012 14:52:01 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 28886 invoked by uid 500); 3 Oct 2012 14:52:01 -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 28878 invoked by uid 99); 3 Oct 2012 14:52:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Oct 2012 14:52:01 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.216.52] (HELO mail-qa0-f52.google.com) (209.85.216.52) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Oct 2012 14:51:54 +0000 Received: by qabg24 with SMTP id g24so1707434qab.11 for ; Wed, 03 Oct 2012 07:51:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:content-type:x-gm-message-state; bh=tZw2VjjX3xEZYnmHQnvG+6YM6QzR4aasaV7olwY3/pY=; b=HNyrQdh8LkwHWm73a2rnpcsdi1s5ZqFFHD3+GFwqDmo1ThlCqrUElMun1ZnmY1eu/e RWHRpsM5NtQLaDRiv30IjibWA0iMLEegRGFm6j9EGEURrPrUKzNaxYD2t3yrIKn465w3 23ZThTvihp4nx8IPcj+qRKkuRjjHjGDbpHjVnbctpiX0c5n6/gMrSIxUki2thnfyMcZg OE/94qBcXV4ZVsFjyB8quOYLr99C4ktYdsPL2OmWN0sCcs/yjuZ0Mdn6Y0J1vHXf4yM9 Rd1YXWVRf4Eac3T9zXDUV6J9/aiuQVBXVuTkJzQxV32UFNEvtDE6mGbULHg/H9k/legW fIzQ== MIME-Version: 1.0 Received: by 10.224.34.195 with SMTP id m3mr7685535qad.19.1349275893060; Wed, 03 Oct 2012 07:51:33 -0700 (PDT) Received: by 10.49.35.48 with HTTP; Wed, 3 Oct 2012 07:51:33 -0700 (PDT) X-Originating-IP: [84.112.19.176] In-Reply-To: <20121003171913.02e33b2b@eee-az> References: <20121003171913.02e33b2b@eee-az> Date: Wed, 3 Oct 2012 16:51:33 +0200 Message-ID: Subject: Re: any good way of filtering out your own _changes? From: Dave Cottlehuber To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQkN9W5vKIevaDijf5ARIJmaf9KOMMM487ocpLKPOVZ3eW66no++4MZ7/jAzIjLpJwNL5bhD X-Virus-Checked: Checked by ClamAV on apache.org On 3 October 2012 16:19, svilen wrote: > g'day > > so i have a local db that replicates bidirectional with several others. > an app uses local db, listens to _changes and also puts > things sometimes. Any way to avoid it seeing it's own changes? > i guess i can put a manual field e.g. "source" to *each* document or > something... but that's not very neat. but may be the only way, hmmm - > e.g. how to differ between different copies of same app.. running in > parallel. > > ah, and any way to automaticaly sequence items? Even if "eventual" as in > "eventual consistency".. ? > Now i am putting a separate field for that ( =db.doc_count ) at each > update, but i dont like it.. Use either a view (look up complex keys on the wiki for example), or put it into the id of the doc: 00001_the_other_id 00002_the_next_id > there is _local_seq in the document API that returns the sequenceid > of the revision, but that is not accesible in views.. or actualy now i > see it can be made accessible by adding extra options in the view > definition. hmm i have to try that. Seems like a better fit. A little more info on what you're trying to achieve might give us some better ideas. A+ Dave