Business
Jobs
  • About Us
  • Solutions
    • Candidates
      Highly qualified candidates in 48h.
    • Assessments
      500+ technical and psychological assessments, plus anti-fraud system.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Pay in 15+ LATAM countries without setting up a local entity.
  • Pricing
  • Jobs

0

248
Views
Mongoose no selecciona el registro que no se unió a ninguno, en $búsqueda

Puedo implementar con éxito la búsqueda, pero el problema es ese; No necesito los registros que no tienen ningún registro para unirme a la colección infantil. Actualmente obtengo una matriz en blanco para el campo secundario, si no se encuentra un registro coincidente en la colección secundaria. Nota: estoy usando MongoDB Flexible Schema

 $lookup: { from: 'childCollection', let: { typeId: { '$toObjectId': '$typeId' } }, pipeline: [{ $match: { $expr: { $eq: ['$_id', '$$typeId'] }, $or: [{ 'field1': { $regex: 'searchkey', $options: "i" } }, { 'field2': { $regex: 'searchkey', $options: "i" } }] } }], as: 'test' }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

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