Database

db={"users":[{"_id":ObjectId("5c4185be19da7e815cb18f59"),"name":"User1"},{"_id":ObjectId("5c4185be19da7e815cb18f5a"),"name":"User2"}],"posts":[{author:ObjectId("5c4185be19da7e815cb18f59"),text:"Usfgfdger1 is my name"},{author:ObjectId("5c4185be19da7e815cb18f5a"),text:"My name is User2, but this post doesn't start with it"}]}

Query

db.users.aggregate([{$lookup:{from:"posts",let:{authorId:"$_id",name:"$name"},pipeline:[{$match:{$expr:{$and:[{$ne:[{$indexOfCP:["$text","$$name"]},-1]},{$eq:["$author","$$authorId"],}]}}}],as:"post"}}])

Result