Is a bucket pattern in MongoDb the best way to handle large unbounded arrays? Is a bucket pattern in MongoDb the best way to handle large unbounded arrays? mongoose mongoose

Is a bucket pattern in MongoDb the best way to handle large unbounded arrays?


The bucket pattern is not the perfect match on the case you expose.

The pattern best fits your needs is the outlier pattern https://www.mongodb.com/blog/post/building-with-patterns-the-outlier-pattern

Your case is practically the same as the example on this article.