Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 43720 invoked from network); 15 Jun 2010 18:43:24 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Jun 2010 18:43:24 -0000 Received: (qmail 32523 invoked by uid 500); 15 Jun 2010 18:43:23 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 32320 invoked by uid 500); 15 Jun 2010 18:43:22 -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 Delivered-To: moderator for user@couchdb.apache.org Received: (qmail 61587 invoked by uid 99); 15 Jun 2010 07:36:35 -0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of afters.mail@gmail.com designates 74.125.82.52 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=QqkuCP1kY1wPLnCRKTS2MNKehejnT42g1DhJtjy+k2g=; b=xJQCQYbwOlxNNx+B+V7qZ/Zq5mRTNBxQgS6Wy/feDhgGviKIA9IfIG6HrNe08meEqe tFlnjdlb8LW2+Lx00h5ZH0HwRMaqCkiHx81QCHxxRp21kSVgbl+Pw8QXg1yCF3Koqr5i yVQCSISlkQN5taBcD3EbdW2x5t7lIRzvBQgBY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=sK0PsYe+35KA04QhnnYwHO6pieYTxpzRBFP6lodXO1IWz0ImmrXAukJm3qnusv5Qv1 nYo+xRKcSDunGtr6gUd7FguFYSQZ7n1CiN1Gy0s5NnAzF66KeLpZ/sLgFstdo4Yv+KVO J0vxNpUSCl+33G/NRwnjldtJ8dNSWsWhXbk0k= MIME-Version: 1.0 Date: Tue, 15 Jun 2010 10:36:06 +0300 Message-ID: Subject: Re: Can I get just the keys from a view? [SEC=UNCLASSIFIED] From: afters To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=0016e65b60369aaca104890ca8dc X-Virus-Checked: Checked by ClamAV on apache.org --0016e65b60369aaca104890ca8dc Content-Type: text/plain; charset=ISO-8859-1 I'm fairly new to couch myself, but here goes: You could use a list function that would crop the values and leave the keys. Also, you could write a reduce function that does the same - just query the view with 'group=true' so each view-doc gets its own reduce. a. On 15 June 2010 05:26, Lowry, Matthew wrote: > Hi folks. A Couch newbie here with a question regarding the view API. > > Is there any way that I can query a view and get just the key for each > row, and omit the value? > > The reason I ask is I'm working with a view that generates a massive > amount of data - each document in the database generates many hundreds > of rows in the view. Each row has a large value object. But all I want > to do is get the keys. So it's wasting a massive amount of time and > resources, both client and server side, to have to pull both the key and > value object for every row in the view when all I want to see is the > key. > > So is there actually a mechanism in the view API to pull just the key > from each row of a view? And if not, why not? That would be curiously > asymmetrical with the document API, which allows me to get the IDs of > all the documents without requesting the documents themselves. > > Cheers. > > IMPORTANT: This email remains the property of the Department of Defence and > is subject to the jurisdiction of section 70 of the Crimes Act 1914. If you > have received this email in error, you are requested to contact the sender > and delete the email. > --0016e65b60369aaca104890ca8dc--