Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 46160 invoked from network); 8 Sep 2009 18:31:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Sep 2009 18:31:55 -0000 Received: (qmail 80741 invoked by uid 500); 8 Sep 2009 18:31:54 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 80668 invoked by uid 500); 8 Sep 2009 18:31:54 -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 80658 invoked by uid 99); 8 Sep 2009 18:31:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Sep 2009 18:31:54 +0000 X-ASF-Spam-Status: No, hits=2.7 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of richinsr@mac.com designates 17.148.16.87 as permitted sender) Received: from [17.148.16.87] (HELO asmtpout012.mac.com) (17.148.16.87) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Sep 2009 18:31:44 +0000 MIME-version: 1.0 Content-type: multipart/alternative; boundary="Boundary_(ID_NmXqEKTpkJTIgonTujJUiw)" Received: from [192.168.67.229] ([69.241.19.12]) by asmtp012.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KPO003V00R48P30@asmtp012.mac.com> for user@couchdb.apache.org; Tue, 08 Sep 2009 11:30:42 -0700 (PDT) Message-id: <92BB7E88-67F2-4A8A-8AB9-1EBE23052FA4@mac.com> From: Ryan Richins To: user@couchdb.apache.org Subject: How to query multi item key Date: Tue, 08 Sep 2009 14:24:56 -0400 X-Mailer: Apple Mail (2.936) X-Virus-Checked: Checked by ClamAV on apache.org --Boundary_(ID_NmXqEKTpkJTIgonTujJUiw) Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-transfer-encoding: 7BIT Hi, I have been trying to figure out the right way to query a multi item key but have not had any luck. Given the following set of data: {"key":["27.0.0.1","2009/08/12 18:37:06 +0000"],"value":null}, {"key":["12.0.0.1","2009/08/13 02:29:57 +0000"],"value":null}, {"key":["17.0.0.1","2009/08/14 21:25:27 +0000"],"value":null}, {"key":["31.0.0.1","2009/08/15 02:54:03 +0000"],"value":null}, {"key":["11.0.0.1","2009/08/16 08:35:15 +0000"],"value":null}, {"key":["12.0.0.1","2009/08/17 19:21:59 +0000"],"value":null} If I want all of the IP's in a given date range (2009/08/13 - 2009/08/16) what is the right way to construct the query? The hang-up is trying to figure out the right value for the first item in the key to act as a '*' Below are a few of the following I have tried but none of which work. http://localhost:5984/foo/_design/test/_view/by_ip_and_created_at?startkey= [null,"2009/08/13"]&endkey=[null,"2009/08/16"] http://localhost:5984/foo/_design/test/_view/by_ip_and_created_at?startkey= [null,"2009/08/13"]&endkey=[{},"2009/08/16"] http://localhost:5984/foo/_design/test/_view/by_ip_and_created_at?startkey= [{},"2009/08/13"]&endkey=[{},"2009/08/16"] http://localhost:5984/foo/_design/test/_view/by_ip_and_created_at?startkey= ["","2009/08/13"]&endkey=["","2009/08/16"] Thanks, Ryan --Boundary_(ID_NmXqEKTpkJTIgonTujJUiw)--