couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Meno Abels (JIRA)" <>
Subject [jira] Created: (COUCHDB-528) Views and keyed access
Date Wed, 14 Oct 2009 22:38:31 GMT
Views and keyed access

                 Key: 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,
                        start_key = Key,
                        end_key = Key
                    }, CurrentEtag, Db, RowCount,
                        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


This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message