From dev-return-6868-apmail-couchdb-dev-archive=couchdb.apache.org@couchdb.apache.org Thu Oct 15 04:38:55 2009 Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 69959 invoked from network); 15 Oct 2009 04:38:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Oct 2009 04:38:55 -0000 Received: (qmail 70879 invoked by uid 500); 15 Oct 2009 04:38:54 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 70652 invoked by uid 500); 15 Oct 2009 04:38:54 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 70641 invoked by uid 99); 15 Oct 2009 04:38:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Oct 2009 04:38:54 +0000 X-ASF-Spam-Status: No, hits=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Oct 2009 04:38:51 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7741D234C045 for ; Wed, 14 Oct 2009 21:38:31 -0700 (PDT) Message-ID: <1513324745.1255581511473.JavaMail.jira@brutus> Date: Wed, 14 Oct 2009 21:38:31 -0700 (PDT) From: "Meno Abels (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Closed: (COUCHDB-528) Views and keyed access In-Reply-To: <1911717151.1255559911289.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COUCHDB-528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Meno Abels closed COUCHDB-528. ------------------------------ Resolution: Fixed Thx, for the fast help, now it works but i don't get why the emit has to be doc._id in that case? > Views and keyed access > ---------------------- > > Key: COUCHDB-528 > URL: https://issues.apache.org/jira/browse/COUCHDB-528 > Project: CouchDB > Issue Type: Bug > Components: Database Core > Affects Versions: 0.9.1 > Environment: linux > Reporter: Meno Abels > > If you try eg. > curl -v -d '{"keys":["srp_WPG","srp_WLUX"]}' http://localhost:5984/booking_reverseidxes/_design/Booking::ReverseIdx-0aab4fe0eb7bdb4ac59f67c4e9453b52/_view/all > you will except in the best case a answer of two rows. If the two key rows exists. If I use _all_docs it works like excepted. If I use a view the answer is a empty rows array. > I had a in depth look to the source in ./src/couchdb/couch_httpd_view.erl > but I am just to new with erlang, to find the problem and fix it. > It is still possible that I make a usage error, than feel free to blame me. > I expect the problem in > output_map_view(Req, View, Group, Db, QueryArgs, Keys) -> > .... > FoldlFun = make_view_fold_fun(Req, > QueryArgs#view_query_args{ > start_key = Key, > end_key = Key > }, CurrentEtag, Db, RowCount, > #view_fold_helper_funs{ > reduce_count = fun couch_view:reduce_to_count/1 > }) > which is the only differend code part between keyed and none keyed access. > My map method in the view looks like this which should be harmless and not depend to the problem. > { > "all": { > "map": "function(doc) { > if (doc['couchrest-type'] == 'Booking::ReverseIdx') { emit(null,null); } > }" > } > } > thx in advance > meno -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.