From 39ae77af4029ebb104bdc377164cc018b5082ec1 Mon Sep 17 00:00:00 2001
From: agrt56 <andreas.gaertner@mni.thm.de>
Date: Sat, 18 Jul 2015 17:50:54 +0200
Subject: [PATCH] Add timestamp key to skill_question/freetext_answers_full

---
 src/main/resources/views/skill_question | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/resources/views/skill_question b/src/main/resources/views/skill_question
index 4ea8d73..48198ab 100644
--- a/src/main/resources/views/skill_question
+++ b/src/main/resources/views/skill_question
@@ -62,7 +62,7 @@
 			"reduce": "_count"
 		},
 		"freetext_answers_full": {
-			"map": "function(doc) { if (doc.type == 'skill_question_answer') { emit(doc.questionId, doc); } }"
+			"map": "function(doc) { if (doc.type == 'skill_question_answer') { emit([doc.questionId, doc.timestamp], doc); } }"
 		},
 		"by_session_only_id_for_all": {
 			"map": "function(doc) { if (doc.type == 'skill_question' && doc.active == 1) { emit(doc.sessionId, null); }}"
-- 
GitLab