3

basically i have this query that searches from an array of names...now i want to make it case insensitive

in GO

err = c.Find(bson.M{
        "name": bson.M{
            "$in": names,
        },
    }).All(&res)

Result search by Raíz name

1 document

search by raíz name 0 document

I would like the query to be something like this:

db.getCollection('g-se_tags').find({'name':'raíz', }).collation( { locale: "es", strength: 1 } )

Result search by Raíz name

1 document

search by raíz name 1 document

1
  • Ditch mgo for good. It's been unmaintained for many years. Use the official mongo-go driver. Commented Jan 16, 2023 at 17:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.