Meteor.publish( 'pagination', function( collection, split, page ) { check( collection, String ); check( split, Number ); check( page, Match.OneOf( String, Number ) ); var documents = global[ collection ].find( {}, { fields: { _id: 1 } } ).fetch(), documentChunks = _.chunk( documents, split ), filter = page ? parseInt( page, 10 ) : 0, ids = _.map( documentChunks[ filter ], '_id' ); return global[ collection ].find( { _id: { $in: ids } } ); });