[362] | 1 | { |
---|
| 2 | "_users/rft_admin": { |
---|
| 3 | "__configAction": "ignore", |
---|
| 4 | "_id": "org.couchdb.user:rft_admin", |
---|
| 5 | "name": "rft_admin", |
---|
| 6 | "password": "Welkom01", |
---|
| 7 | "roles": [ "rft_admin" ], |
---|
| 8 | "type": "user" |
---|
| 9 | }, |
---|
| 10 | "rft/_security": { |
---|
| 11 | "__configAction": "ignore", |
---|
| 12 | "admins" : { |
---|
| 13 | "names" : [], |
---|
| 14 | "roles" : ["rft_admin"] |
---|
| 15 | }, |
---|
| 16 | "readers" : { |
---|
| 17 | "names" : [], |
---|
| 18 | "roles" : ["rft_user"] |
---|
| 19 | } |
---|
| 20 | }, |
---|
| 21 | "rft/q1": { |
---|
| 22 | "__configAction": "update", |
---|
| 23 | "_id": "q1", |
---|
| 24 | "title": "How long have you worked here?", |
---|
| 25 | "categories": [ |
---|
| 26 | "Professional background" |
---|
| 27 | ], |
---|
| 28 | "topic": "Work experience", |
---|
| 29 | "type": "Question" |
---|
| 30 | }, |
---|
| 31 | "rft/q2": { |
---|
| 32 | "__configAction": "update", |
---|
| 33 | "_id": "q2", |
---|
| 34 | "title": "How many years have you been employed here?", |
---|
| 35 | "categories": [ |
---|
| 36 | "Respondent personals", |
---|
| 37 | "Professional background" |
---|
| 38 | ], |
---|
| 39 | "topic": "Work experience", |
---|
| 40 | "type": "Question" |
---|
| 41 | }, |
---|
| 42 | "rft/q3": { |
---|
| 43 | "__configAction": "update", |
---|
| 44 | "_id": "q3", |
---|
| 45 | "title": "Have you worked here longer than 10 years?", |
---|
| 46 | "categories": [ |
---|
| 47 | "Respondent personals" |
---|
| 48 | ], |
---|
| 49 | "topic": "Work experience", |
---|
| 50 | "type": "Question" |
---|
| 51 | }, |
---|
| 52 | "rft/q4": { |
---|
| 53 | "__configAction": "update", |
---|
| 54 | "_id": "q4", |
---|
| 55 | "title": "Rate your experience at your current employer from 1 to 10.", |
---|
| 56 | "categories": [ |
---|
| 57 | "Respondent personals", |
---|
| 58 | "Professional background" |
---|
| 59 | ], |
---|
| 60 | "topic": "Work enjoyment", |
---|
| 61 | "type": "Question" |
---|
| 62 | }, |
---|
| 63 | "rft/_design/default": { |
---|
| 64 | "__configAction": "replace", |
---|
| 65 | "_id": "_design/default", |
---|
| 66 | "language": "javascript", |
---|
| 67 | "validate_doc_update": "function(newDoc, oldDoc, userCtx, secObj) { if (oldDoc && oldDoc.published) { throw({forbidden: 'Published documents cannot be modified.'}); } }", |
---|
| 68 | "views": { |
---|
| 69 | "by_type": { |
---|
| 70 | "map": "function(doc){ emit(doc.type, doc); }" |
---|
| 71 | }, |
---|
| 72 | "unpublished": { |
---|
| 73 | "map": "function(doc){ if ( doc.type === 'Survey' && !doc.published ) { emit(doc._id, doc); } }" |
---|
| 74 | }, |
---|
| 75 | "questions": { |
---|
| 76 | "map": "function(doc){ if ( doc.type === 'Question' ) { for (var i = 0; i < doc.categories.length; i++) { emit([doc.categories[i],doc.topic],1); } } }", |
---|
| 77 | "reduce": "function(keys,values) { return sum(values); }" |
---|
[375] | 78 | }, |
---|
| 79 | "topics": { |
---|
| 80 | "map": "function(doc){ if ( doc.type === 'Question' ) { emit(doc.topic, 1); } }", |
---|
| 81 | "reduce": "function(keys, values) { return null; }" |
---|
[362] | 82 | } |
---|
| 83 | } |
---|
| 84 | } |
---|
| 85 | } |
---|