Database

[{_id:"doc1",type:"SR",title:"...",description:"...",author:"5",posts:[{author:"1",title:"..."},{author:"2",title:"..."},{author:"1",title:"..."}]},{_id:"doc2",type:"SA",title:"...",description:"...",posts:[],author:"5"}]

Query

db.collection.find({$or:[{$and:[{type:"SA"},{author:"5"}]},{"posts.author":"1"}]},{posts:{$filter:{input:"$posts",as:"post",cond:{$eq:["$$post.author","1"]}}},_id:1,type:1,title:1})

Result