Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 44548 invoked from network); 10 Feb 2011 00:46:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 10 Feb 2011 00:46:52 -0000 Received: (qmail 17379 invoked by uid 500); 10 Feb 2011 00:46:49 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 17315 invoked by uid 500); 10 Feb 2011 00:46:49 -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 17307 invoked by uid 99); 10 Feb 2011 00:46:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Feb 2011 00:46:49 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jjfutbol@gmail.com designates 209.85.216.52 as permitted sender) Received: from [209.85.216.52] (HELO mail-qw0-f52.google.com) (209.85.216.52) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Feb 2011 00:46:41 +0000 Received: by qwi4 with SMTP id 4so601070qwi.11 for ; Wed, 09 Feb 2011 16:46:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id:references:to :x-mailer; bh=83nh4CV30AcPNc6bGdgYFYL6IWqAlxlCfAaxl4udWkE=; b=nfxVinOokxmELdQQlED/k1aYGuD83KjZyTQ6THY2yhB79E/hWB/rGaO+E2U5tKBb4b 9liuP9khX+RofjKDjd3Y1nET9pmh3WYQ5obs8kXHA+GByacreefK/KZu/PGN9bC3r12G /2QbyzhMWfo5cChDCDHgPVyqABXX1/ELARBWY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=YIVLq7AfoLIQir3scfvcoJHUO/yQluU4Qyn3SDTPjRVaavZFdEGIbnYylEvZN0Ansd F2GF8jnwSF/oQ9kL19BwBqwZ/+Mb3HepZLXzebL7dx7ta27W8D6y6jT5AXowYxhw1eND Bcw0ktxqFLt3zEcPnGir0xkEM7KwRzqq1wGV8= Received: by 10.224.45.134 with SMTP id e6mr9557888qaf.270.1297298780622; Wed, 09 Feb 2011 16:46:20 -0800 (PST) Received: from [10.10.10.43] ([74.113.162.2]) by mx.google.com with ESMTPS id y17sm600174qci.21.2011.02.09.16.46.19 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 09 Feb 2011 16:46:20 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1082) Subject: Re: wrong view results? From: Javier Julio In-Reply-To: Date: Wed, 9 Feb 2011 19:46:18 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1082) X-Virus-Checked: Checked by ClamAV on apache.org It looked odd to me at first too and I just happened to have that page = open. Glad I checked. Yeah makes sense its used a lot. Nice that either = one will be supported! Are you getting the correct results now Mark? Let us know. On Feb 9, 2011, at 7:42 PM, Paul Davis wrote: > On Wed, Feb 9, 2011 at 7:37 PM, Javier Julio = wrote: >> No it should be "startkey" and "endkey" (no underscores, has to be = all lowercase otherwise not recognized). = http://wiki.apache.org/couchdb/HTTP_view_API >>=20 >> On Feb 9, 2011, at 7:31 PM, Paul Davis wrote: >>=20 >>> On Wed, Feb 9, 2011 at 5:52 PM, Mark Hahn wrote: >>>> I'm getting what seems to me to be the wrong view results. Of = course >>>> if I am doing something wrong it would be no surprise. >>>>=20 >>>> I have a view called itemByEmailNum. Here is the definition of the = view ... >>>>=20 >>>> function(doc) { >>>> if(doc.type =3D=3D 'item') >>>> emit([doc.email, doc.itemNumber], null); >>>>=20 >>>> Here is what I get from that view with no keys specified. >>>>=20 >>>> {"total_rows":2,"offset":0,"rows":[ >>>> = {"id":"86d5d83c65c3d901e29c7567be001233","key":["root",12],"value":null}, >>>> = {"id":"86d5d83c65c3d901e29c7567be001e68","key":["root",13],"value":null} >>>> ]} >>>>=20 >>>> Here is the url of the view that seems to give the wrong results. >>>> I've added spaces here for clarity. >>>>=20 >>>> /bb/_design/bb/_view/itemByEmailNum ? keystart=3Dsusan%40elleh.com, = 0 & >>>> keyend=3Dsusan%40elleh.com, 1000000000 & include_docs=3Dtrue & >>>> descending=3Dtrue >>>>=20 >>>> This should not have gotten any results since the only docs have = the >>>> first key of "root" and both the keystart and keyend in this = request >>>> have a first key of susan%40elleh.com. Here are the results it >>>> returned. I've snipped the doc properties for clarity. >>>>=20 >>>> {"total_rows":2,"offset":0,"rows":[ >>>> = {"id":"86d5d83c65c3d901e29c7567be001e68","key":["root",13],"value":null,"d= oc":{ >>>> ... }}, >>>> = {"id":"86d5d83c65c3d901e29c7567be001233","key":["root",12],"value":null,"d= oc":{ >>>> ... }} >>>> ]} >>>>=20 >>>> Any help would be appreciated. I'm using CouchDB 1.0.1. >>>>=20 >>>=20 >>> keystart and keyend should be start_key and end_key. >>=20 >>=20 >=20 > Ah right. Older versions are still on the no underscore version. 1.1.0 > and beyond will recognize both because people tend to add the > underscore.