summaryrefslogtreecommitdiff
path: root/puppet/modules/site_couchdb/files/designs/messages
diff options
context:
space:
mode:
Diffstat (limited to 'puppet/modules/site_couchdb/files/designs/messages')
-rw-r--r--puppet/modules/site_couchdb/files/designs/messages/Message.json12
1 files changed, 6 insertions, 6 deletions
diff --git a/puppet/modules/site_couchdb/files/designs/messages/Message.json b/puppet/modules/site_couchdb/files/designs/messages/Message.json
index 7bcd74c7..6a48fc4d 100644
--- a/puppet/modules/site_couchdb/files/designs/messages/Message.json
+++ b/puppet/modules/site_couchdb/files/designs/messages/Message.json
@@ -2,17 +2,17 @@
"_id": "_design/Message",
"language": "javascript",
"views": {
- "by_user_ids_to_show_and_created_at": {
- "map": "// not using at moment\n// call with something like Message.by_user_ids_to_show_and_created_at.startkey([user_id, start_date]).endkey([user_id,end_date])\nfunction (doc) {\n if (doc.type === 'Message' && doc.user_ids_to_show && Array.isArray(doc.user_ids_to_show)) {\n doc.user_ids_to_show.forEach(function (userId) {\n emit([userId, doc.created_at], 1);\n });\n }\n}\n",
- "reduce": "function(key, values, rereduce) { return sum(values); }"
- },
"by_user_ids_to_show": {
"map": "function (doc) {\n if (doc.type === 'Message' && doc.user_ids_to_show && Array.isArray(doc.user_ids_to_show)) {\n doc.user_ids_to_show.forEach(function (userId) {\n emit(userId, 1);\n });\n }\n}\n",
- "reduce": "function(key, values, rereduce) { return sum(values); }"
+ "reduce": " function(key, values, rereduce) {\n return sum(values);\n }\n"
+ },
+ "by_user_ids_to_show_and_created_at": {
+ "map": "// not using at moment\n// call with something like Message.by_user_ids_to_show_and_created_at.startkey([user_id, start_date]).endkey([user_id,end_date])\nfunction (doc) {\n if (doc.type === 'Message' && doc.user_ids_to_show && Array.isArray(doc.user_ids_to_show)) {\n doc.user_ids_to_show.forEach(function (userId) {\n emit([userId, doc.created_at], 1);\n });\n }\n}\n",
+ "reduce": " function(key, values, rereduce) {\n return sum(values);\n }\n"
},
"all": {
"map": " function(doc) {\n if (doc['type'] == 'Message') {\n emit(doc._id, null);\n }\n }\n"
}
},
- "couchrest-hash": "0967e7cc5bb1e61edc1c085f6f0cecbf"
+ "couchrest-hash": "ba80168e51015d2678cad88fc6c5b986"
} \ No newline at end of file