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

197
Views
Mongodb Array Query with case insensitive text

I have a record that looks similar to this...

{
  ...
  data: "Email@test.com",
  ...
}

I am trying to query it with db.collection.find({data: $in {['email@test.com']})

I am querying a collection, and most of the time I will have more than one email to query for. Instead of querying as multiple times for every email I need to check, I would like to just pass in an array of emails to query. The issue here being, that the email is not in the same case so I'm unable to match the emails together. I know that Mongo 3.4 handles case insensitivity better, especially with indices, however I am running mongo 3.2.

I have also tried regex

Any ideas on how to execute this while hitting an index? Or how to set this query up better?

over 4 years ago · Santiago Trujillo
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!