emit(null, null) ? Shouldn't you emit your key if you expect "srp_WPG" to match anything? :)
B. On Wed, Oct 14, 2009 at 11:38 PM, Meno Abels (JIRA) <[email protected]> wrote: > 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. > >
