I have a comment collection with Comment Text in array with its Metadata. I like to the pagination in the Comment Text Array. The pagination should allow me to get the \"pr
You can do this with $slice
: http://www.mongodb.org/display/DOCS/Retrieving+a+Subset+of+Fields#RetrievingaSubsetofFields-RetrievingaSubrangeofArrayElements
There's also a js test example of slice here, with several examples: https://github.com/mongodb/mongo/blob/master/jstests/slice1.js
So, findOne
, combined with $slice
, is probably the way to go.
Without more info about the language you're using, I think that's the deepest I can go.