From user-return-16799-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Tue Jun 21 15:33:54 2011 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 960464ED4 for ; Tue, 21 Jun 2011 15:33:54 +0000 (UTC) Received: (qmail 77239 invoked by uid 500); 21 Jun 2011 15:33:52 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 77150 invoked by uid 500); 21 Jun 2011 15:33:52 -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 77142 invoked by uid 99); 21 Jun 2011 15:33:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jun 2011 15:33:52 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mrhanlon@gmail.com designates 74.125.83.52 as permitted sender) Received: from [74.125.83.52] (HELO mail-gw0-f52.google.com) (74.125.83.52) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jun 2011 15:33:45 +0000 Received: by gwj15 with SMTP id 15so1569750gwj.11 for ; Tue, 21 Jun 2011 08:33:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:content-type:content-transfer-encoding :subject:date:message-id:to:mime-version:x-mailer; bh=t1KmfJIAQ3Ktq6kj5sTfU2u6XV+ZwlJP2IQ23LpStWo=; b=WC8qa1pGr99R2KZdUPu1HUIPZiuGtHY0i3JeTqE1Vb+tODz+El6wqQcJ6InjIuxuPP H0u/DfIUrreObLTV3kxE6u3AQmd5qlpXikfw+v+1bSZs1lzJTeqx+7PbbfkH+p6lsQnp QSis10v0LzT1EKWObYgUmFjosByuRtkasfbmo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; b=fLs0Kfo+suXy1dOs0YkjgwrcZ/C+59CknHMs45SaBI43Ilf//yfPwo6xeFjhWB7lOs WKLawXrs0TGF9tWT97ZyZ94LFssyPtjunFtKcxgpSfszIhoh0QRiU1rIPSL7Bc4TxKuK 2ehiQpGcFwQJH2Y5PYDaKjqsqK9L+r1QYSQ2Y= Received: by 10.236.180.38 with SMTP id i26mr10585617yhm.205.1308670404345; Tue, 21 Jun 2011 08:33:24 -0700 (PDT) Received: from matthew-mac2.tacc.utexas.edu (matthew-mac2.tacc.utexas.edu [129.116.126.107]) by mx.google.com with ESMTPS id g30sm4327599yhn.29.2011.06.21.08.33.22 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 21 Jun 2011 08:33:22 -0700 (PDT) From: Matthew R Hanlon Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Regenerate views on (bulk) update Date: Tue, 21 Jun 2011 10:33:21 -0500 Message-Id: <3D891A63-2115-437B-B43C-26D8291CB3EE@gmail.com> To: user@couchdb.apache.org Mime-Version: 1.0 (Apple Message framework v1084) X-Mailer: Apple Mail (2.1084) Excuse me if I am asking a question that has already been addressed... When providing a view_updater script to CouchDB, the updater script = receives the following on an update: "{"type":"updated","db":"my_db"}". = So if 100 updates happen, conceivably the script is called 100 times (I = have found that if the updates are very close together, it does not get = called for each update). But if 100 documents are written to the = database using the _bulk_docs API, then the script is only called a = single time. If the view updater script received some information about = the number of documents that were updated then it could act = appropriately, even for bulk updates. Something like, = "{"type":"updated","db":"my_db","documents":100}". Regards, -Matthew. --- Matthew R Hanlon