So I’ve basically got a schema for a message board type application, where there are threads with referenced comments from another collection in the same database. The schema looks like this:
Is there a way for me to create a search index that will also populate the info from the comments collection and search across the 2 merged collections?
Additionally, I’m curious about the “populate the info from the comments collection” portion of your statement - Do have an example you can detail of what you’re trying to achieve here?
It is indeed an atlas search index im referring to.
I’ve tried to get $lookup queries to run, but I can’t get the query path to recognise the comments array for each thread.
Perhaps I explained myself poorly. I mean that as comments on each thread are a reference using objectID they might need populating in order to be searched through.
I just want the returned results of a search to include any hits from the actual content in the referenced comments on each main thread.