From user-return-8885-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Mon Feb 22 10:52:05 2010 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 17227 invoked from network); 22 Feb 2010 10:52:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Feb 2010 10:52:05 -0000 Received: (qmail 35222 invoked by uid 500); 22 Feb 2010 10:52:02 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 35136 invoked by uid 500); 22 Feb 2010 10:52:02 -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 34998 invoked by uid 99); 22 Feb 2010 10:52:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Feb 2010 10:52:01 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of b.candler@pobox.com designates 208.72.237.25 as permitted sender) Received: from [208.72.237.25] (HELO sasl.smtp.pobox.com) (208.72.237.25) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Feb 2010 10:51:51 +0000 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id EB6059CFAF; Mon, 22 Feb 2010 05:51:28 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=date:from:to :cc:subject:message-id:references:mime-version:content-type :in-reply-to; s=sasl; bh=7pwkxFlq7aiueL/PSH6Oock7Csw=; b=TrFfGDJ PbRKQPXajrgxHwssIu0K/i8QC9qsMYv2mS7/gKbcnCUW+Gkn+Rxf6xrXj4h65mZc 2wTUUTuUe1VGNzGOFKdw6Mtc3IVYzrIWsTw+dLI7GNa6E1k0e4jAP6Lz1yjUSJEc YRKurIKvnHh03xdtpAYC9Utn5pV2tEbTrZy8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=date:from:to:cc :subject:message-id:references:mime-version:content-type :in-reply-to; q=dns; s=sasl; b=Jq7FiZ5DeIHJUfpiJrccA/2nIjf4Tw/yV jGFclgEtpeF9atA1nZF/MuSamnQDw6hbJ5A2GHlcYOokXwD70xOsn9N0jwNKfrrF Sn0hfsrc60UADQcBn+GAN12O7qXBpXFE6jNAG1hSDF6XaYKTjQKYsiVUZmWCoLy7 1FhOQKxReA= Received: from a-pb-sasl-quonix. (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id CF2209CFAD; Mon, 22 Feb 2010 05:51:27 -0500 (EST) Received: from zino (unknown [87.194.77.98]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 748C69CFA5; Mon, 22 Feb 2010 05:51:26 -0500 (EST) Received: from lists by zino with local (Exim 4.69) (envelope-from ) id 1NjVsq-0001Ok-Jy; Mon, 22 Feb 2010 10:51:24 +0000 Date: Mon, 22 Feb 2010 10:51:24 +0000 From: Brian Candler To: user@couchdb.apache.org Cc: couchdb-user@apache.org Subject: Re: Selecting part of a multi-value key Message-ID: <20100222105124.GA5364@uk.tiscali.com> References: <56a83cd01002211404k76e50f26kc27342bbccf33b7c@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56a83cd01002211404k76e50f26kc27342bbccf33b7c@mail.gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pobox-Relay-ID: 3A52DC32-1FA0-11DF-8D2B-D83AEE7EF46B-28021239!a-pb-sasl-quonix.pobox.com X-Virus-Checked: Checked by ClamAV on apache.org On Sun, Feb 21, 2010 at 02:04:57PM -0800, David Van Couvering wrote: > I have a view that generates a type and a date as a composite key. This way > the results are sorted by type and then by date. That is, something like emit([doc.type,doc.date], ...) ? > I would like to call the view so that I get all rows that match a given > type, regardless of date. I need them sorted by date. startkey=["a_type"]&endkey=["a_type",{}] (with suitable URL encoding). They will still be sorted by date, because they are sorted by [type,date]. For reduce values for all rows with a particular type, look at group_level=1