It’s a very common example, that if we have Posts and Comments in NoSql world, it’s a good solution to store Comments inside the Post document (because comments doesn’t make much sense on their own).
But what if it’s relatively common to have a lot of comments per post? If it happens that there are about 10000 comments for some posts on my blog engine. Comments are paged, so I don’t need all the 10000 at once.
Is it good to load the complete document in that case? What are the solutions?
I don’t have much experience with NoSQL databases (only worked a bit with MongoDB), but I believe you are looking for pagination.
Since you haven’t mentioned which NoSQL database you are looking for, here’s are some ways you can do it:
In most cases, you may need to create a pagniation index before you can use pagination.