I'm trying to do the following:
A player can play to many games.
Every game session has a begining date and a end date.
- a player can have simultaneous game sessions
- a player can have multiple sessions of a same game
(to simplify the samples I set only full years as dates)
I would like a facet/aggregation that filters only the active sessions at a given date.
- HearthStone: 2015-2016
- Magic : 2005-2016
- HearthStone: 2014-2015
- Magic : 2005-2008 & 2009-2010
So if I choose the date 2015, I should have the following result:
- HearthStone : 2
- Magic : 1
I can't manage to get what I want.
I provide my test in the following gist:
Can you give me a clue on how to rearrange my data and/or my facet/aggregation query ?