Database
db={"post":[{"_id":1,"title":"almonds","description":12,},{"_id":2,"title":"pecans","description":20,},{"_id":3,"title":"peanuts","description":20,}],"comments":[{"_id":1,"post":1,"content":"product 1",},{"_id":2,"post":1,"content":"product 2",},{"_id":3,"post":2,"content":"product 3",},{"_id":4,"post":2,"content":"product 4",},{"_id":5,"post":3,"content":"Incomplete"},]}
Query
db.post.aggregate([{"$lookup":{"from":"comments","localField":"_id","foreignField":"post","as":"comments"}},{"$match":{"comments.content":{"$regex":"product"}}},{"$project":{"comments":0}}])