javascript - CouchDB view collation issue -
I have an issue with your couchdb view the first few code:
Here is the view
free: {map: function (doc) {if (doc.type == 'application') {throw ([doc._id, 0], doc)} else if (doc.type == 'client') {throw ([doc._id, 1], doc)} else if (doc.type == 'release') {throw ([doc._id, 2], doc)} else if (doc.type == 'Department') {throw ([doc._id, 3], doc)} else if (doc.type == 'ticket') {if (doc.assigned & amp ;! & amp; doc.priority) { emit ([doc.applications, doc.clients, doc.release, doc.departments, 4], doc)}}}} construction applications, customers and departments usually Saran Quantify
When I view say, I find this as a result
{ "TOTAL_ROWS" :. 9, "offset": 0, "rows": [{"id": "c36cb356c3aa10617ee687ae930010b5", "key" [null, null, null, null, 4], "value": {"_ id": "c36cb356c3aa10617ee687ae930010b5" , "_rev": "1-46 c0118a029d2adefc377ac31ae548b2", "ticketnumber": "asdasdasd" "priority": "12", "description": "asdasd", "deadline": "20.10.2014" "minutesperweek": " 50 "," ordervolume ":" 50 "," impactdescription ":" asdasd "," type ":" ticket "}}, {" id ":" c36cb356c3aa10617ee687ae93001f31 "," key ": [" c36cb356c3aa10617ee687ae93001f31 ", 0], "Value": "c36cb356c3aa10617ee687ae93001f31", "_rev": "1-04098bc81ec5a337f96eab6096fcb022", "name": "info", "type": "application"}}, {"id": "c36cb356c3aa10617ee687ae930024b0" , "Key": ["c36cb356c3aa10617ee687ae930024b0", 0], "value": {"_ Id ":" c36cb356c3aa10617ee687ae930024b0 "," _rev ":" 1-2da7e9fccb85de5d7d334075d64005f4 "," name ":" ap "," type ":" application "}}, {" id ":" C36cb356c3aa10617ee687ae93004bf0 "," key " "{0}", "type" ":" C36cb356c3aa10617ee687e3106ee687e3109015100 "," key ": [" c36cb356c3aa10617ee687ae93005100 ", 0]," value ": {" _id ":" c36cb356c3aa10617ee687ae93005100 "," _rev ":" 1-cfc8610af75c99d29a20698b9568c51d "," name ":" "", "Type": "C36cb356c3aa10617ee687ae93005a89", "key": ["c36cb356c3aa10617ee687ae93005a89", 0], "value": {"_id": "c36cb356c3aa10617ee687ae93005a89", "_rev": "1-56d590eaa45aa073b17b51ec304c0222", "" name " : "Test", "type": "application"}}, {"Id": "c36cb356c3aa10617ee687ae93006306", "key": ["c36cb356c3aa10617ee687ae93006306", 1], "value": {"_id": "c36cb356c3aa10617ee687ae93006306", "_rev": "1-5886b6d2c6a7f52e3e99b12ead71e0b7", "name": "test "," Type ":" client "}} {{id}:" c36cb356c3aa10617ee687ae93006cb5 "," key ": [" c36cb356c3aa10617ee687ae93006cb5 ", 2]," value ": {" _id ":" c36cb356c3aa10617ee687ae93006cb5 "," _rev ": "1-2cd31bf6ada650c899cb021ef8149f90", "name": "test", "type": "release"}}, { "id": "c36cb356c3aa10617ee687ae93007c88", "key": [ "c36cb3" Eddie "," type ":" Department "}}}} What bugs did to me, it is that all these applications, customers and departments also emits, if there are any of these I'm not in my ticket.
Any idea how to fix that code?
Comments
Post a Comment