Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 17067 invoked from network); 24 Mar 2010 14:42:40 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Mar 2010 14:42:40 -0000 Received: (qmail 44485 invoked by uid 500); 24 Mar 2010 14:42:39 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 44420 invoked by uid 500); 24 Mar 2010 14:42:39 -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 44167 invoked by uid 99); 24 Mar 2010 14:42:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Mar 2010 14:42:39 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of fynwine@gmail.com designates 209.85.220.226 as permitted sender) Received: from [209.85.220.226] (HELO mail-fx0-f226.google.com) (209.85.220.226) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Mar 2010 14:42:32 +0000 Received: by fxm26 with SMTP id 26so5188329fxm.35 for ; Wed, 24 Mar 2010 07:42:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:reply-to:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=gcj0SWAXEk18KLMVneDRN5Rzq+JeRLV3h3HQgUwyc9Y=; b=A4S6Ol+7haGuRFZgGyVy4dVSMIet8VXLDYLxuowRb1NNEMoxhTJH61AZy7dJjl03P2 RgaOx8LsP8OD938kP4P25VGZJFht4HGxgUfJxj0+Su6JRCuZyU/YVbDD6ienj8vm7Ive myQp9+Cwsi7M7vV8ZroB469cFWomVuajqEWfs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:reply-to:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=Afdfb7Jlksjlv+/5bVueHHcxq0/AEYnxqOZlA/Pj8MJq2iFyVsEeTbY9DkiCyKLlwr QepcfJutinrbuwOv4RgZKU/7+c0Cx7/owmI/3JHj2HaXhTceZq8FVo+3OAHtjXq/fNSR wkKlvGe8ylT7bVkUIGdFD5it8iaaOvL6Ei8hw= MIME-Version: 1.0 Sender: fynwine@gmail.com Reply-To: aj@ajbrown.org Received: by 10.223.64.141 with SMTP id e13mr7006189fai.101.1269441731741; Wed, 24 Mar 2010 07:42:11 -0700 (PDT) In-Reply-To: References: Date: Wed, 24 Mar 2010 10:42:11 -0400 X-Google-Sender-Auth: ffd1ac934ae7bcc7 Message-ID: Subject: Re: Help With View Query From: "A.J. Brown" To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Thanks guys, that was it. Glad to know that I at least knew what I was doing as far as they keys themselves were concerned. 2010/3/24 COING G=E9rard : > > Le 23 mars 2010 =E0 22:51, A.J. Brown a =E9crit : > >> Hi All, >> >> I'm having some trouble querying a view. =A0Can you help me out? =A0I'm >> trying to query a view of comments for a specific topic. =A0My view has >> the topic document id and a ISO date string as the key. >> >> I've tried many combinations of the following, but no matter what I >> always get the entire list of comments back. =A0There are 3 comments in >> the database that should match (have the correct topic_id) and 6 total >> rows. >> >> startKey=3D["2e7768c509e896e658ecb75f3c1cf84c",null]&endKey=3D["2e7768c5= 09e896e658ecb75f3c1cf84c",{}] >> startKey=3D["2e7768c509e896e658ecb75f3c1cf84c"]&endKey=3D["2e7768c509e89= 6e658ecb75f3c1cf84c",{}] >> startKey=3D["2e7768c509e896e658ecb75f3c1cf84c",null]&endKey=3D["2e7768c5= 09e896e658ecb75f3c1cf84c","\u9999"] >> startKey=3D["2e7768c509e896e658ecb75f3c1cf84c",null]&endKey=3D["2e7768c5= 09e896e658ecb75f3c1cf84c",null, >> null] > > I think your problem is here : "startkey" and "endkey" (all in lower case= ) > >> >> Here's the map function for that view: >> >> function(doc) {if( doc.type =3D=3D 'comment' ) { emit( [doc.topic_id, >> doc.created], doc );}} >> >> And here's an example comment document: >> >> { >> =A0 "_id": "1b324c9430cd734bc08ae773c659170c", >> =A0 "_rev": "1-8526badbb1259f10cd4b938a2e7c3918", >> =A0 "type": "comment", >> =A0 "author": "ajbrown", >> =A0 "topic_id": "2e7768c509e896e658ecb75f3c1cf84c", >> =A0 "parent_comment_id": "", >> =A0 "message": "tsetst etettstts", >> =A0 "created": "2010-03-23T17:32:19-04:00" >> } >> >> In Futon, my keys look right. =A0Example: >> >> ["2e7768c509e896e658ecb75f3c1cf84c", "2010-03-23T17:32:19-04:00"] >> >> -- >> A.J. Brown >> Software Engineer, ZCE >> blog : http://ajbrown.org >> talk =A0: (937) 540-0099 >> chat : IntypicaAJ > > --=20 A.J. Brown Software Engineer, ZCE blog : http://ajbrown.org talk : (937) 540-0099 chat : IntypicaAJ