What would be a good approach to implement a global search that spans over 3 fields on 2 collections?
The main CollectionFS MyPix contains documents with images and some metadata. And there’s a separate collection DocLinks that contains Links and references to the main MyPix collection via MyPix’ IDs.
If a user performs a search, I’d like to return all documents that contain the term in one of these fields:
MyPix collection
.name
.metadata.tags
DocLinks collection // (linked via MyPix' IDs)
.name
Results from DocLinks would return the corresponding MyPix IDs that would link to documents on MyPix – which would be added to the results from searching the 2 fields on MyPix.
Thanks!