Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

225
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda