From b579cb41fbac1ab2be1049915527768b3743a010 Mon Sep 17 00:00:00 2001 From: agrt56 <andreas.gaertner@mni.thm.de> Date: Wed, 13 May 2015 02:39:39 +0200 Subject: [PATCH] Task #15766: Add views for round independed answer count --- src/main/resources/views/skill_question | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/resources/views/skill_question b/src/main/resources/views/skill_question index a71dc81..4ea8d73 100644 --- a/src/main/resources/views/skill_question +++ b/src/main/resources/views/skill_question @@ -45,10 +45,18 @@ "map": "function(doc) { if (doc.type == 'skill_question_answer') { emit([doc.questionId, doc.piRound, doc.answerText], 1); }}", "reduce": "_sum" }, + "count_all_answers_by_question": { + "map": "function(doc) { if (doc.type == 'skill_question_answer') { emit([doc.questionId, doc.answerText], 1); }}", + "reduce": "_sum" + }, "count_total_answers_by_question_and_piround": { "map": "function(doc) { if (doc.type == 'skill_question_answer') { emit([doc.questionId, doc.piRound], 1); }}", "reduce": "_sum" }, + "count_total_answers_by_question": { + "map": "function(doc) { if (doc.type == 'skill_question_answer') { emit(doc.questionId, doc); }}", + "reduce": "_count" + }, "count_abstention_answers_by_question": { "map": "function(doc) { if (doc.type == 'skill_question_answer' && doc.abstention) { emit(doc.questionId, doc); } }", "reduce": "_count" -- GitLab