Mongodb count the number of consecutive matching docs and merge them into one

Yes the more I think of it I think this is what I will have to do. Some of it will have to be done by writes so that reads don’t have to do a lot of complex grouping.

1 Like