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

82
Views
Búsqueda de Mongo DB por prioridad de condición

Estoy realizando una búsqueda en la colección basada en diferentes columnas. Básicamente, lo que necesito es que cuando busque, el nombre que comience con la palabra clave ingresada debería aparecer en la parte superior de la lista, y luego deberían aparecer otros nombres de diferentes columnas que contengan la palabra clave.

Tengo dificultades para encontrar la funcionalidad directa en MongoDB para realizar esta operación. Cualquier lógica es apreciada.

ejemplo :

 [ { name : Pro1}, { name : testpro}, { name : Pro2}, { name : testpro2} ] so when I query on this array with the keyword **Pro** the expected output should be : [ Pro1,Pro2,testpro,testpro2] so that all the names starting with the exact keyword should appear first then the list of names containing the keyword should be there.
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 Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!