Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 68436 invoked from network); 27 Mar 2010 21:14:41 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 Mar 2010 21:14:41 -0000 Received: (qmail 47903 invoked by uid 500); 27 Mar 2010 21:14:40 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 47862 invoked by uid 500); 27 Mar 2010 21:14:40 -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 47854 invoked by uid 99); 27 Mar 2010 21:14:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Mar 2010 21:14:40 +0000 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=AWL,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jchris@gmail.com designates 209.85.210.178 as permitted sender) Received: from [209.85.210.178] (HELO mail-yx0-f178.google.com) (209.85.210.178) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Mar 2010 21:14:32 +0000 Received: by yxe8 with SMTP id 8so4948552yxe.30 for ; Sat, 27 Mar 2010 14:14:11 -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=QlFovg69ssTm21esp+UpInxEKs1nB/4eDH7oQUvYFw4=; b=VgUH763sRh9FEfwIW5s7fCXOYLTGifDN8ubvq+QOnlc51Z0IuNGCLxHG81M/vBhLuN GM2uvqdblps5syzn+XqusKD2RXoUqh/BSpCdInxrLgQMXzrs0IubtNCFRpE4FF5YQdtl IzdOYVRgv2XaIJ0jZSNZng1KfasYnfsRJ60Gg= 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=WFWkoZvKeyE3cgoFnJmCpCZjC5jSRJ5FhliC00e2sITRPRqSEZ2EoK9ao/muSVVe3C KHcktXahlwrLC5dxPQeIHxMOUbq5pCgz7GPiVTUiRSXtwm4zZbTxCQH1x9aCojQGgeka s59UZ2aiKqt28gqnwqX1MUDe5TOz/6kQ5Olg8= Received: by 10.150.55.6 with SMTP id d6mr3009049yba.226.1269724451661; Sat, 27 Mar 2010 14:14:11 -0700 (PDT) Received: from [10.0.1.213] (h-74-1-186-35.snfccasy.static.covad.net [74.1.186.35]) by mx.google.com with ESMTPS id 4sm630503ywg.24.2010.03.27.14.14.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 27 Mar 2010 14:14:10 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1077) Subject: Re: bulk Updates From: J Chris Anderson In-Reply-To: Date: Sat, 27 Mar 2010 14:14:08 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <289836B3-764C-4CCF-8234-97616D0D6A11@gmail.com> References: To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1077) On Mar 24, 2010, at 5:03 PM, faust 1111 wrote: > if i follow >=20 > The CouchDB pattern would be something like: >=20 > 1. Define a view that allows you to fetch the docs you want. > 2. Fetch the docs, possibly using ?include_docs=3Dtrue > 3. Update the docs in the client > 4. Push all the docs back using _bulk_docs >=20 > its will be to slow in my case > i have contents with authors: > content { > authors: [ > {name: 'Lara', slug: 23424}, > {name: 'Dimon', slug: 23445} > ] > } >=20 > if author change name i must fetch 2000 docs and by hand change author > name in each doc With a large number of matching docs, you'll want to do the updates in = batches. If you have a view query that the asynchronous process is = trying to empty, you can easily cope with updates that come in later = (after the first pass of the batch is complete) by rerunning old rename = queries a for some time window after the preference is updated. I know it's not as simple as a SQL update, but it is compatible with = multi-master replication and offline editing. Chris > this is crazy job guy`s. >=20 > May be i`am thinking in wrong way? > please help.