From user-return-6942-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Wed Oct 21 11:17:07 2009 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 30280 invoked from network); 21 Oct 2009 11:17:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Oct 2009 11:17:07 -0000 Received: (qmail 24496 invoked by uid 500); 21 Oct 2009 11:17:06 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 24422 invoked by uid 500); 21 Oct 2009 11:17:05 -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 24412 invoked by uid 99); 21 Oct 2009 11:17:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Oct 2009 11:17:05 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mauricio.szabo@gmail.com designates 209.85.210.176 as permitted sender) Received: from [209.85.210.176] (HELO mail-yx0-f176.google.com) (209.85.210.176) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Oct 2009 11:17:03 +0000 Received: by yxe6 with SMTP id 6so4197428yxe.13 for ; Wed, 21 Oct 2009 04:16:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=R+UQPlyEjxtkbBBMhTwO7XUsufrH2CmNooxPzsBqiYQ=; b=iJedzyZxp2LY4XfKpE5RwgSUbLXo/whZtX0cADOf5ftYCMs1L2RpDlGh8pk1GPXi2G +8SZAFTGwEwR6j6EAZ+7EGeE/UQLuV2+Kd2GCqdF2gt9Gyvu3A9l6Pf7O+24B9+SkL5G CalDugOHwAPldbYU9HXt/FS+RTFDeVLW2xim0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=bt/WFbmtIeLT8yo4Z3i8wYIeM8jx2UMfccGcEUGaXeeYY9yx+IXDOBYRibs9oekqTs dcweLHK+kZCIWz6RtwwIOc+tDKQS2Ch41h7BN8IZKSDs8/cUy2jyHrQedncue7jWDKQ4 d5SIGjS+udHjW5ogqZXUBOVU4E9WmlVCkIw70= MIME-Version: 1.0 Received: by 10.101.201.2 with SMTP id d2mr4493008anq.197.1256123802367; Wed, 21 Oct 2009 04:16:42 -0700 (PDT) Date: Wed, 21 Oct 2009 09:16:42 -0200 Message-ID: Subject: Finding with two fields From: =?ISO-8859-1?Q?Maur=EDcio_Szabo?= To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=0016e6d2658108b86e0476701d24 --0016e6d2658108b86e0476701d24 Content-Type: text/plain; charset=ISO-8859-1 Hello, list. I have a problem on an aplication I'm trying to migrate to CouchDB: I have a series of documents like: { type: "Period", start: "2009-10-12", end: "2009-12-12" } Problem is, I need to check on my application if there is a valid period. I need to search if: (start < today) and (today < end) How can I do this in CouchDB? I've tried creating views, but I'm stuck (I'm emitting [doc.start, doc.end] as an index, but I still cannot find a way to search this). Thanks in advance, Mauricio. --0016e6d2658108b86e0476701d24--