diff --git a/src/main/resources/views/skill_question b/src/main/resources/views/skill_question index a71dc81c0dd1a4b28760cc5daa2b254a8815700c..4ea8d731b3adcac457443e979e38e0a02c03055e 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"