Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

230
Views
Is it possible to make a multiple-collection index (or search) in MongoDB?

I have an app that queries a MongoDB database with a text index that has to return objects from multiple collections, just like the Instagram query that looks for people, hashtags or locations at the same time.

I'm looking for a way to have this collections separated normally, but having a single MongoDB index for the 3 collections.

I've been looking for this but all I find is multiple column indexes and compound indexes inside the same collection.

Is this possible to accomplish on MongoDB? Without making another collection to store all objects, I mean...

If not, can I query multiple collections using similar indexes like full-text and geolocated indexes?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

MongoDB doesn't provide inter collection communication mostly to maintain high availability and scaling ability. ($lookup is one off exception).

So index spanning different collection? NO, joins on different collection, NO (at least No for healthy use). Triggers? NO (Not yet). Transactions? NO.

It would be a mess if mongoDB is used with RDBMS best practices. learn to denormalize.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!