Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 32779 invoked from network); 10 Feb 2011 00:26:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 10 Feb 2011 00:26:16 -0000 Received: (qmail 90762 invoked by uid 500); 10 Feb 2011 00:26:14 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 90419 invoked by uid 500); 10 Feb 2011 00:26:13 -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 Delivered-To: moderator for user@couchdb.apache.org Received: (qmail 92034 invoked by uid 99); 9 Feb 2011 22:54:02 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) MIME-Version: 1.0 From: Mark Hahn Date: Wed, 9 Feb 2011 14:52:58 -0800 Message-ID: Subject: wrong view results? To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 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. I have a view called itemByEmailNum. Here is the definition of the view ... function(doc) { if(doc.type == 'item') emit([doc.email, doc.itemNumber], null); Here is what I get from that view with no keys specified. {"total_rows":2,"offset":0,"rows":[ {"id":"86d5d83c65c3d901e29c7567be001233","key":["root",12],"value":null}, {"id":"86d5d83c65c3d901e29c7567be001e68","key":["root",13],"value":null} ]} Here is the url of the view that seems to give the wrong results. I've added spaces here for clarity. /bb/_design/bb/_view/itemByEmailNum ? keystart=susan%40elleh.com, 0 & keyend=susan%40elleh.com, 1000000000 & include_docs=true & descending=true 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. {"total_rows":2,"offset":0,"rows":[ {"id":"86d5d83c65c3d901e29c7567be001e68","key":["root",13],"value":null,"doc":{ ... }}, {"id":"86d5d83c65c3d901e29c7567be001233","key":["root",12],"value":null,"doc":{ ... }} ]} Any help would be appreciated. I'm using CouchDB 1.0.1.