Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

234
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda