Count of user who visited 3 days in a row

I have elasticsearch documents like {"user":"a","timestamp":1449807786150}. Would like to query users who have timestamp for 3 consecutive days.

Ok, and do you want help with that, or something else.

Yes, need help to query the data. What would be the DSL?


I understand we can use data range. But I want to get say "number of users who have logged in 3 consecutive days for month of December or number of users who have logged in n consecutive days in the last m days (m is always greater than n)" Thanks

Can someone please help me on this? Thanks