From 39f3631993b24dde2b64de31580bb4513a174a2a Mon Sep 17 00:00:00 2001 From: Christoph Thelen <christoph.thelen@mni.thm.de> Date: Tue, 3 Mar 2015 15:46:49 +0100 Subject: [PATCH] Fix for #14551: View creators and their session count --- src/main/resources/views/statistics | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/resources/views/statistics b/src/main/resources/views/statistics index 7bcfb8d..d975725 100644 --- a/src/main/resources/views/statistics +++ b/src/main/resources/views/statistics @@ -5,6 +5,10 @@ "statistics":{ "map":"function(doc) { if (doc.type == 'session') { if (doc.active == 1) { emit('openSessions', 1); } else { emit('closedSessions', 1); } } if (doc.type == 'skill_question') { if (doc.questionVariant === 'lecture') { emit('lectureQuestions', 1); } else if (doc.questionVariant === 'preparation') { emit('preparationQuestions', 1); } } if (doc.type == 'skill_question_answer') { emit('answers', 1); } if (doc.type === 'interposed_question') { emit ('interposedQuestions', 1); } }", "reduce":"_count" + }, + "unique_session_creators":{ + "map":"function(doc) { if (doc.type === 'session') { emit(doc.creator, 1); } }", + "reduce":"_count" } } } -- GitLab