Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 44026 invoked from network); 5 Aug 2008 16:31:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Aug 2008 16:31:07 -0000 Received: (qmail 10293 invoked by uid 500); 5 Aug 2008 16:31:05 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 10258 invoked by uid 500); 5 Aug 2008 16:31:05 -0000 Mailing-List: contact couchdb-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-user@incubator.apache.org Delivered-To: mailing list couchdb-user@incubator.apache.org Received: (qmail 10247 invoked by uid 99); 5 Aug 2008 16:31:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Aug 2008 09:31:05 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jchris@gmail.com designates 74.125.92.145 as permitted sender) Received: from [74.125.92.145] (HELO qw-out-1920.google.com) (74.125.92.145) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Aug 2008 16:30:08 +0000 Received: by qw-out-1920.google.com with SMTP id 4so243577qwk.54 for ; Tue, 05 Aug 2008 09:30:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=pRCtjUlBght8cw8kWzB3JZZNB+9kA7qGXOrtY3Zx+j4=; b=Opdp8FhZFyFaJKSVdFao620zFATdzPGDvf12fS87yBN+TK4W0fAM/w7ujecVLqsZjq hMxDnf5fgu69nuhQXnLkTJcEB5Jg2d3diSWZJj9SpuOHCDVmHaZXgoCbROfmJIkzK3F4 aSfof6YCRu8EcEDkLozIXZ/cPp34vincYyj74= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=h/leUlJ4bAF0TktqDXlOXtIiS8J5SdUOzt8ikDdicudbGWmHh8wifHsF/mzCswnxT/ tAqdzO9IqO1GKnrcLTiofLrRURfGagjWZreeIV2fOk0TcSslvCU5HnvIOmlL2vagQsAo vSG1SHtYKglKl8hay1rBKc3L5h7WNrUSp0+SU= Received: by 10.151.114.6 with SMTP id r6mr1711314ybm.84.1217953824959; Tue, 05 Aug 2008 09:30:24 -0700 (PDT) Received: by 10.151.44.19 with HTTP; Tue, 5 Aug 2008 09:30:24 -0700 (PDT) Message-ID: Date: Tue, 5 Aug 2008 09:30:24 -0700 From: "Chris Anderson" Sender: jchris@gmail.com To: couchdb-user@incubator.apache.org Subject: Re: Optionally including docs in view results In-Reply-To: <9DF72862-153C-4752-92E0-5DA4EF65CDE1@blit.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48974B09.5080807@inflatablecookie.com> <489752DF.2030603@inflatablecookie.com> <489775CC.3010707@inflatablecookie.com> <64a10fff0808041442r6d864058rd923b494207a7882@mail.gmail.com> <9DF72862-153C-4752-92E0-5DA4EF65CDE1@blit.com> X-Google-Sender-Auth: 9a1a387ce9df10b8 X-Virus-Checked: Checked by ClamAV on apache.org On Tue, Aug 5, 2008 at 9:02 AM, Troy Kruthoff wrote: > +1 for the bulk_docs api, specifically being able to perform multiple > REST-type operations in a single request should be "bulk_docs" by > definition. > Part of the complexity comes from the fact that _bulk_docs is already used in replication, so it has some options that aren't normally used in a standard POST from an application. Currently with _bulk_docs you can do the equivalent of PUT (create/update with _id), POST (create without _id), and DELETE (update set _deleted=true). So most of the RESTful options are available, they just aren't segregated by verb. You can't do GET yet - to me it just seems confusing to allow both modification of documents and fetching of documents in the same http request. If I'm wrong, and we really should include document fetches in _bulk_docs, it won't be impossible to code, but we should make sure the feature is clear. The POST body can certainly accommodate both "docs" and "ids" members, its just a matter of how to structure the response so that it's clear which parts of the response come from which CouchDB actions. (Not to mention all the edge-cases around documents that are both updated by the "docs" member, and requested by the "ids" member, or maybe the update phase succeeds but one of the request docs is 404.) -- Chris Anderson http://jchris.mfdz.com