Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 44343D639 for ; Sat, 6 Oct 2012 20:28:12 +0000 (UTC) Received: (qmail 80740 invoked by uid 500); 6 Oct 2012 20:28:10 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 80713 invoked by uid 500); 6 Oct 2012 20:28:10 -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 80702 invoked by uid 99); 6 Oct 2012 20:28:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Oct 2012 20:28:10 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of carl.bourne@me.com designates 17.158.236.243 as permitted sender) Received: from [17.158.236.243] (HELO nk11p04mm-asmtp008.mac.com) (17.158.236.243) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Oct 2012 20:28:05 +0000 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Received: from [10.35.212.115] (dab-bas2-h-12-3.dab.02.net [82.132.217.66]) by nk11p04mm-asmtp008.mac.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Jan 3 2012)) with ESMTPSA id <0MBH000GENI1B350@nk11p04mm-asmtp008.mac.com> for user@couchdb.apache.org; Sat, 06 Oct 2012 20:27:44 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.7.7855,1.0.431,0.0.0000 definitions=2012-10-06_06:2012-10-06,2012-10-06,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1203120001 definitions=main-1210060249 Subject: Re: Help with reduce function References: <620C985E-E1AC-48C9-8EC4-7C3F42C98FF5@me.com> <8B7BA084-B1C0-46FA-95CA-8065947B8F29@utt.fr> <65464099-C893-4A3F-9466-88298C55A37E@me.com> <8D941ACF-A15F-4651-9F5B-F378E9D5D05B@utt.fr> <75098634-1472-45F0-B03D-A8F5C8CA1E94@me.com> <5421E001-5474-41F1-96D7-31057A8D090E@utt.fr> From: Carl Bourne X-Mailer: iPhone Mail (10A403) In-reply-to: <5421E001-5474-41F1-96D7-31057A8D090E@utt.fr> Message-id: Date: Sat, 06 Oct 2012 21:27:32 +0100 To: "user@couchdb.apache.org" Content-transfer-encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Thanks I thought I was missing something obvious! So is it possible to build a reduce function to do this and use the expiry d= ate as the key?=20 Carl Bourne | Senior Sales Engineer | mobile: +44 (0) 7770 284294 | www.vena= fi.com On 6 Oct 2012, at 21:19, Aur=C3=A9lien B=C3=A9nel wr= ote: >> My documents have expiry dates and I need the ability to build queries th= at only returns documents that have an expiry date between the startkey and e= ndkey parameters. >=20 > I had no idea of your use case. So no, you don't need any group_level for t= hat.=20 > Sorry, I was fooled by your reduce function (I found weird to count docs w= ith the exact same timestamp). >=20 >=20 > Regards, >=20 > Aur=C3=A9lien