Database

[{book_id:"1",title:"B1",year:2012,comments:[{author:"A1",text:"C1"}]},{book_id:"2",title:"B2",year:2012,comments:[{author:"A2",text:"C2.0"},{author:"A1",text:"C2.1"},{author:"A1",text:"C2.2"},]},{book_id:"3",title:"B3",year:2013,comments:[{author:"A1",text:"C3"}]},]

Query

db.collection.aggregate([{$match:{year:2012,comments:{$elemMatch:{author:"A1"}}}},{$unwind:"$comments"},{$match:{year:2012,"comments.author":"A1"}},{$group:{_id:null,data:{$push:"$comments.text"}}}])

Result