I’m trying to figure out how to properly search a collection and a relation at the same time?
Lets say I have Users setup like this:
{
_id: ObjectId("1234"),
firstName: "John",
lastName: "Smith"
}
And Posts setup like this:
{
_id: ObjectId("8877"),
author: ObjectId("1234")
title: "My Post",
}
How could I do a search on posts that could grab any posts that match my query on post.title or user.firstName or user.lastName?