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

142
Views
¿Cómo evitar la negación al usar guión?

Tengo una consulta que se parece a:

 db.mycollection.find({ $text: { $search: "my -city" } })

Si ejecuto esta consulta, negará city . Pero quiero buscar la frase exacta my -city . ¿Cómo puedo hacer esto?

El texto a buscar podría ser my-city o my - city my -city ¿Hay alguna forma en que pueda indicarle a mongodb que no use la negación como comportamiento predeterminado y solo use la coincidencia exacta de cadenas?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Intenta envolverlo en \"...\" así

 db.mycollection.find({ $text: { $search: "\"my -city\"" } })
about 4 years ago · Juan Pablo Isaza 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!