Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 65863 invoked from network); 24 Feb 2011 14:56:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Feb 2011 14:56:02 -0000 Received: (qmail 35778 invoked by uid 500); 24 Feb 2011 14:56:00 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 35551 invoked by uid 500); 24 Feb 2011 14:55:57 -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 35542 invoked by uid 99); 24 Feb 2011 14:55:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Feb 2011 14:55:56 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [109.169.49.54] (HELO zoe.mltserver-three.co.uk) (109.169.49.54) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Feb 2011 14:55:50 +0000 Received: from [85.210.32.127] (helo=pap-jr-ii.lan) by zoe.mltserver-three.co.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1PscbI-0007nr-9M for user@couchdb.apache.org; Thu, 24 Feb 2011 14:55:28 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1082) Subject: Re: View for multiple IDs From: Martin Hewitt In-Reply-To: <4D666BB5.2010405@cloudant.com> Date: Thu, 24 Feb 2011 14:55:26 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <87AEBE6D-D363-46D1-8213-0D69C8EC8E26@thenoi.se> <4D666BB5.2010405@cloudant.com> To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1082) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - zoe.mltserver-three.co.uk X-AntiAbuse: Original Domain - couchdb.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - thenoi.se X-Source: X-Source-Args: X-Source-Dir: Perfect, this is exactly what I was looking for, thanks David! Martin On 24 Feb 2011, at 14:31, David Hardtke wrote: >=20 > You don't need a view for this. You can use the bulk document API to = fetch multiple documents with a single request: >=20 > http://wiki.apache.org/couchdb/HTTP_Bulk_Document_API >=20 > On 02/24/11 05:26, Justin Walgran wrote: >> You definitely want to POST the keys to the view. Looping over the >> entire view in a list function slows down noticeably for a large >> number of documents. >>=20 >> To get the docs with the 3 keys mentioned in your example, you could >> do something like this. >>=20 >> curl -X POST -d '{"keys": ["asdf", "powsf", "aaaa"]}' -H >> 'Content-Type: application/json' >> 'http://localhost:5984/db/_design/app/_view/view_name' >>=20 >>=20 >> Justin >>=20 >> On Thu, Feb 24, 2011 at 6:41 AM, Martin Hewitt = wrote: >>> Hi all, >>>=20 >>> How would I create a view to retrieve documents with the IDs (i.e. >>> non-numeric, non-sequential): >>>=20 >>> ["asdf", "powsf", "aaaa"] >>>=20 >>> I would like the three documents that match these IDs, is this = doable >>> in one view or should I just retrieve them individually? >>>=20 >>> Thanks, >>>=20 >>> Martin >>>=20 >=20