Hello everyone,
I have a very specific problem. Let me simplify it.
We have an index on exam papers, where each row has fields "student-id","exam-date" and "exam-score".
What i want is to show each student their rank among all students by exam-date relative to their total exam-score in that month/year. As a single number in metric visualization.
For example:
sid:A, exam-date:Jan 2016, exam-score:50
sid:A, exam-date:Jan 2016, exam-score:60
sid:C, exam-date:feb 2016, exam-score:100
sid:B, exam-date:Jan 2016, exam-score:80
sid:C, exam-date:Jan 2016, exam-score:20
sid:C, exam-date:Jan 2016, exam-score:10
So for the query sid:C and date:jan 2016, we would get the result "3", because the total score for C in jan 2016 is 30, for B is 80 and for A is 110.
Now, filtering by the date is easy. But i just could not write this query in terms of kibana.
One good thing is that i can define any other index i want, with the condition that it should be easy to update it each time a new exam comes. So for example i can define the following index if it will make this easier:
Sid:A, date:jan 2016, total-score:110
Sid:A, date:2016, total-score:110
Sid:C, date:jan 2016, total-score:30
Sid:C, date:2016, total-score:130
Sid:B, date:jan 2016, total-score:80
Thanks in advance.