Group and slice array
@Aggregation(pipeline = {
"{ $match: {'category':{$regex : ?0, $options: 'i'}}}",
"{ $group: { _id: {category:'$category'}, data: { $push: '$$ROOT' } } }",
"{ $project: { _id: 0, category:'$_id.category', videos:{ $slice:['$data',?1,?2]} }"
})